Service Virtualization

Expand all | Collapse all

Parameterizing "content type" field in attachment section

Jump to Best Answer
  • 1.  Parameterizing "content type" field in attachment section

    Posted 25 days ago
    Hi,
    I am performing so web service test with attachments, using "Web Service Execution (XML)" step. I need to provide a dynamic attachment for the services, where I need to give dynamic content Types like "application/xml, application/pdf, application/octet-stream, etc". But I am not able to parameter the content type as {{propertyname}}. Tool is allowing only to select the drop down values. 

    Kindly provide a solution for this to achieve my automation for services with attachments. 



    Thanks,
    Senthilnathan. S


  • 2.  RE: Parameterizing "content type" field in attachment section

    Posted 24 days ago
    One way to achieve this would be to create a number of sub-processes. Each subprocess would only have one step, the "Web Service Execution (XML)" step, with a unique content type. The name of the subprocess would contain a reference to specific Content Type.

    You can parameterize the name of a subprocess in a Call Subprocess step, so you make it like eg. "WebServiceExecution_{{propertyname}}". And you make sure that property name contains the needed reference to the Content Type before the flow reaches the Call Subprocess step.




    ------------------------------
    Cheers,
    Danny
    ------------------------------



  • 3.  RE: Parameterizing "content type" field in attachment section
    Best Answer

    Posted 21 days ago
    Thanks Danny. 
    I have already applied this option but during any changes, I may need to update all the steps, so its getting little complicated. 

    I just tried to put all the content types in the same step with same contentId, it automatically picking the right attachment. It worked.