Forum Discussion

steve1589's avatar
steve1589
New Contributor
14 years ago

Property Transfer

I am trying to preform a property transfer from a value in one test step to an attribute in the next test step. I have tried looking in the posts here but nothing that seems to be of any help to me. I am trying to transfer the value "ObservationType" from the WFS getCapabilities response <ns6:Name>ObservationType</ns6:Name> to the WFS getFeature <wfs:Query typeName="ObservationType"/>.

Here is the first test step response:
velope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns6:WFS_Capabilities version="1.1.0"
xmlns:ns2="http://www.opengis.net/ogc"
xmlns:ns3="http://www.opengis.net/gml"
xmlns:ns4="http://www.w3.org/1999/xlink"
xmlns:ns5="http://www.opengis.net/swe/1.0.1"
xmlns:ns6="http://www.opengis.net/wfs"
xmlns:ns7="http://www.opengis.net/om/1.0"
xmlns:ns8="http://www.opengis.net/sensorML/1.0.1"

xmlns:ns10="urn:us:mil:ces:metadata&colon;ddms:4"

xmlns:ns12="http://www.opengis.net/gml/3.2"


xmlns:ns15="http://www.opengis.net/sampling/1.0"
xmlns:ns16="http://www.w3.org/2001/SMIL20/"

xmlns:ns18="http://www.opengis.net/sos/1.0"

xmlns:ns20="http://www.opengis.net/ows"
xmlns:ns21="http://www.opengis.net/wfs-util"
xmlns:ns22="http://www.w3.org/2001/SMIL20/Language">
...
<ns6:FeatureTypeList>
<ns6:Operations>
<ns6:Operation>Query</ns6:Operation>
</ns6:Operations>
<ns6:FeatureType>
<ns6:Name>ObservationType</ns6:Name>
<ns6:Title>ObservationType</ns6:Title>
...
</ns6:FeatureType>
</ns6:FeatureTypeList>
...
</ns6:WFS_Capabilities>
</S:Body>
</S:Envelope>

Here is the receiving test step request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wfs="http://www.opengis.net/wfs">
<soapenv:Header/>
<soapenv:Body>
<wfs:GetFeature service="WFS" version="1.1.0">
<wfs:Query typeName="ObservationType"/>
</wfs:GetFeature>
</soapenv:Body>
</soapenv:Envelope>

I realize I need to make a change to the getFeature request; add in a "variable" substitution. Finding documentation on this is not easy. I am in the process of going through the on-line tutorials for the second time; although with soapUI Pro this time. I am not proficient in groovy ... yet.

Any help would greatly be appreciated.

Steve

3 Replies

  • Aaronliu's avatar
    Aaronliu
    Frequent Contributor
    This should be easy to transfer one value from response to next request. three steps can be done: first step-- response (test request), second step--property transfer,third step-- test request. so in the first step, you would get correct response, in second step, you need to add property transfer test step,in property transfer step, the first needs to add a name whatever you define,and then you can select source and target step. in source field, you should select previous step and response.the target step you should select the third step and request. in source area, adding the xpath expression which specify the value you want to transfer (if your soapui version is pro, you would select right-side icon to generate the xpath expression automatically, if not, you need to manually write it),in target area, the same way to give out xpath expression that you want to receive the value which transferred from the first step. try to do it



    Thanks,
    Aaron
  • steve1589's avatar
    steve1589
    New Contributor
    Thank you for your response but it didn't help much. You describe what I was attempting to do. After playing with it several days later, to clear my mind, I figured it out. I am still doing what you describe but I accomplished it in one step. I selected the output of the first response and "transferred" it to the second request. Thanks again for trying to help.

    The automatic point-and-click menus of the soapUI Pro was great. I never would have figured it out in the basic soapUI since I am still learning all this "stuff".