Service Virtualization

  • 1.  Service Virtualisation

    Posted Dec 06, 2018 07:42 AM

    Hi All

     

     I created a virtualized service using request/response pair and deployed it at the server, but when I'm trying to hit the generated endpoint from the test case I'm getting below error message:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
        <soapenv:Fault>
          <faultcode xmlns:ns1="ns1:HTTP</faultcode" rel="nofollow" target="_blank">http://xml.apache.org/axis/">ns1:HTTP</faultcode>
          <faultstring>(404)Not Found</faultstring>
          <detail>
            <string>return code:  404
    &lt;html&gt;&lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;Not Found&lt;/h1&gt;The requested URL was not found on this server.&lt;p&gt;&lt;hr&gt;&lt;/body&gt;&lt;/html&gt;</string>
            <ns2:HttpErrorCode xmlns:ns2="404</ns2:HttpErrorCode" rel="nofollow" target="_blank">http://xml.apache.org/axis/">404</ns2:HttpErrorCode>
          </detail>
        </soapenv:Fault>
      </soapenv:Body>
    </soapenv:Envelope>

     

    Can someone help me out with what am I doing wrong

     

    Thanks and Regards

    Yugain Sharma



  • 2.  Re: Service Virtualisation

    Broadcom Employee
    Posted Dec 06, 2018 07:50 AM

    Have a look at the basepath inside the Listen step if your virtual service model, is it generic enough. You can always replace what you have there with / (slash)



  • 3.  Re: Service Virtualisation

    Posted Dec 06, 2018 08:09 AM

    Hi Danny

     

    The basepath is generic. I defined it as:

    /Yugain/MatchRecepient

     

    But still getting the same error

     

    Thanks and Regards

    Yugain



  • 4.  Re: Service Virtualisation

    Broadcom Employee
    Posted Dec 06, 2018 08:21 AM

    Have you tried defining it as / ?

     

    What is the url you use to send a request to the virtual service?

     

    You get a 404 not found, that means that the VSE is listening on the port that you target. If not you would get a connection refused if nothing was listening on that port. Next, the VSE looks at the incoming URI and validates if the incoming URL matches one of the basepaths of the virtual services deployed for that port. The fact you get a 404 means IMHO that the incoming URL does not match the basepath.

     

    It's a bout root cause analysis, if you try basepath / then you should be certain whatever is send to that port ends up inside your Virtual service, and you should see the transaction count go up.

     

    Cheers,

    Danny



  • 5.  Re: Service Virtualisation

    Broadcom Employee
    Posted Dec 06, 2018 09:13 AM

    Try  http://hostname:Port//Yugain/MatchRecepient/  

    If you still have issues,  please attach your sample RR pairs.