Service Virtualization

  • 1.  How to access virtual service as WSDL

    Posted Nov 22, 2018 03:05 PM

    Hi team,

     

    I have created SOAP virtual service and deployed it. I want to access the virtual service as wsdl like real service.

    Is it possible to access the Virtual Service as WSDL. If yes, what is the process.

     

    Thank you.

    Rajasekhar



  • 2.  Re: How to access virtual service as WSDL
    Best Answer

    Broadcom Employee
    Posted Nov 23, 2018 12:20 AM

    If I understand the requirement correctly: you have deployed a SOAP virtual service, if some client sends a request for retrieving the wsdl information then you want to send that back.

     

    In that case the SOAP virtual service will receive an HTTP request as follows: GET /<myUrl>?wsdl

     

    A simple, pragmatic way to implement this is to add a transaction similar to the above in your vsi. You can see exactly in the inspection view of your virtual service what the signature of the incoming wsdl-request is. Add that signature to your vsi and put the wsdl info in the response.

     

    Incoming request will be transformed by the HTTP Listen step into a request object as follows:

    Operation      : GET /<myUrl>

    Argument(1)   : wsdl

     

    The SOAP DPH will find that the payload is NOT a SOAP:Envelope and will not transform the request object and hence the request will reach the Response Selection step with above signature

     

    You only need to add a META response, no exact matches needed.

     

    Hope this helps.

     

    Cheers,

    Danny