Forum Discussion

onserv's avatar
onserv
New Contributor
10 years ago

xml document as a datasource driven input parameter for service request

In the ready api test suite tools, what is the proper way to wrap a datasource value, that happens to be an xml document input for my web service call...I'm not familiar with ng test scripting as of this evening...and did not see any concrete examples.  Now,   I know how to do this manually easily enough, soap ui auto decorates things in the form interface (ie. if you enter <?xml   in the form...the raw xml is properly escaped...so manually there is nothing to do other than make sure you don't go into raw xml (ie. use the form interface for the parameter if you are unfamiliar with escaping syntax...pop xml doc there and voila).

 

So what is the trick to do that step in the test suite?  

 

Here is what my raw xml request would look like...pseudo syntax off the top...

 

<![CDATA[  ${dsMyXMLScenarios#myxmldocstring} ]]>   

 

In otherwords, from simple soap ui request test, if  I put an xml doc in my request input, and review the raw data, the data is marked up and works fine <urn:test1> <![CDATA <?xml my xml doc string works fine when manually entered...> ]]> </urn:test1

 

I don't see how to do that step on a datasource pulling back that xml document string...if I mark up the raw template and happen to go back to form view...I loose my data decorations...so that is not correct.  Although I could swear tagging the raw data worked once...and I'm figuring I should not have to play with my source xml data...

 

test file

     xml

1  <xml ...   <blips><funky reality=-1/></blips>

2

3

 

 

 

Cheers,

djm

  • The way to handle this is:

     

    1) do not use the form tab...use the xml tab to mark up request binding property in the test suite project....

    2) make sure you don't have spaces in those tag wrappers...the spaces will break the request...in my original post, I had some

    spaces between [  $ and at the end }  ]  and for some reason that breaks things....

    So this idea works fine, the source can be an xml doc string.

    <![CDATA[${dsMyXMLScenarios#myxmldocstring}]]> 

    3) make sure you read item 1.

     

    Thanks tech support.

    djm

     

  • onserv's avatar
    onserv
    New Contributor

    The way to handle this is:

     

    1) do not use the form tab...use the xml tab to mark up request binding property in the test suite project....

    2) make sure you don't have spaces in those tag wrappers...the spaces will break the request...in my original post, I had some

    spaces between [  $ and at the end }  ]  and for some reason that breaks things....

    So this idea works fine, the source can be an xml doc string.

    <![CDATA[${dsMyXMLScenarios#myxmldocstring}]]> 

    3) make sure you read item 1.

     

    Thanks tech support.

    djm

     

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi Onserv,

       

      Thanks for sharing your solution with us.