Service Virtualization

  • 1.  XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 09:21 AM

    Hi,

    I'm trying to create a VS Image using REST data protocol and XML request response pairs. The transactions in the image created are only checking for Method /URI (example: POST /Devtest/SampleVirtualService) and the arguments were not checked like XML / JSON data protocol.

     

    Is there any way to check for xml arguments and URI both.

     

    Thanks,

    Venkatesh



  • 2.  Re: XML Arguments not checked for REST data protocol
    Best Answer

    Posted Apr 17, 2017 10:35 AM

    Try Using generic XML payload Parser. And select it manually.



  • 3.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 10:46 AM

    Thanks Monika for your prompt response,

     

    Yeah this can be done when the request doesn't contain more number of comparable arguments but when the number of arguments to be compared are more or the arguments change for various set of call's this approach would be quite troublesome I guess.

     

    Just wanted to check if we can use any other approach to make this simple. please let me know if you come across any. 

     

    Regards,

    Venkatesh



  • 4.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 10:54 AM

    Possible for you to share request response? 

    That will help in debugging.

     

    Thanks,

    Monika



  • 5.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 12:58 PM
      |   view attached

    I am not supposed to share the actual request response, but have attached dummy one's. The number of tags to compare would be more in the actual request.

     

    When I create the Image using them and the data protocol as REST , the transactions would only check for URI (POST /REST/SampleRequestURI) and ignore the arguments.

     

    I would like to have both URI as well as attributes to compare for virtualizing REST based services using XML as data format.

     

    Thanks,

    Venkatesh

    Attachment(s)

    zip
    sample.zip   549 B 1 version


  • 6.  Re: XML Arguments not checked for REST data protocol

    Broadcom Employee
    Posted Apr 17, 2017 10:57 AM

    Hi Venkatesh

    If I understand your need correctly, a request containing more/less number of arguments than what is present in the sample request is a common design requirement.

     

    The virtual service design would depend on the combination of set of arguments which make up a unique request. For all the other incoming arguments - you can use Request Data Manager to either keep the mandatory arguments, or remove the unwanted ones.



  • 7.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 01:06 PM
      |   view attached

    Hi Prem,

     

    I have explained the requirement on reply to Monika's answer, please refer to it.

     

    "When I create the Image using the attached RR pairs and the data protocol as REST , the transactions would only check for URI (POST /REST/SampleRequestURI) and ignore the arguments.

     

    I would like to have both URI as well as attributes to compare for virtualizing REST based services using XML as data format"

    Attachment(s)

    zip
    sample.zip   549 B 1 version


  • 8.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 01:09 PM

    Hi Venkat, 

     

    Rest data protocol handler identifies only the URI parameters. to parse the xml body content, use the xml data protocol followed by rest data protocol as monika suggested. 

     

    Thanks,

    Anna



  • 9.  Re: XML Arguments not checked for REST data protocol

    Posted Apr 17, 2017 01:16 PM

    like this ... 

     

    image file would be like this

     



  • 10.  Re: XML Arguments not checked for REST data protocol

    Posted May 17, 2017 09:18 AM

    got your point Prem.

     

    Used Generic XML payload parser and used only few important arguments to check, it worked.

     

    Thanks