Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

What is the best approach to virtualize a dynamic WCF Service request?

Charu_Taneja
Charu_Taneja Posts: 8
edited January 2019 in Virtualize

I have a case where the request is generated dynamically from WCF service (please refer to attached file). Request and Country Code are the only two tags that are passed to Parasoft for virtualization.
What is the best approach to virualize such scenario since all the parameters are within Request tag itself?

Tagged:

Comments

  • jakubiak
    jakubiak Posts: 795 admin

    See the WCF Routing Service on the Parasoft marketplace - https://marketplace.parasoft.com/#query?limit=24&offset=0&keywords=wcf. Contact your Parasoft representative if you need login credentials to marketplace.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited January 2019

    The Virtualize message responder has a "Form Input" view which will let you configure each of the XML elements in your SOAP Body and SOAP Header. There will be a single text field for configuring the value of your "Request" element. Since your request element is a single string containing multiple parameters, one idea would be to parameterize the different parts of this string using ${varname} at the appropriate places so you could pull the parameter values from a data source, for example.

    Concerning the WCF Routing Service, this makes it possible to virtualize service endpoints that required complex or Microsoft proprietary service bindings, decrypting/decoding the original message and then forwarding them to Parasoft Virtualize over plain HTTP as plain SOAP XML (WCF's BasicHttpBinding). So, whether you need to use the WCF Routing Service really depends on what WCF binding is used by the service endpoint you are attempting to virtualize. In other words, you probably need this if your service is using WsHttpBinding or NetTcpBinding or a custom binding, but not if your service was already using BasicHttpBinding.