Forum Discussion

lbolanos's avatar
15 years ago

Property Transfer XQuery

Hello

I have this response.


<entry>
<key>tmax</key>
<value xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">0</value>
</entry>
<entry>
<key>cause</key>
<value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">sendOK</value>
</entry>
<entry>
<key>error</key>
<value xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">0</value>
</entry>
<entry>
<key>allow</key>
<value xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">1</value>
</entry>
<entry>
<key>BAS.basId</key>
<value xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">1007</value>
</entry>
<entry>
<key>BAS.value</key>
<value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">VALUE_LEO</value>
</entry>
<entry>
<key>IP</key>
<value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">127.0.0.1:22</value>
</entry>
<entry>
<key>BAS.name</key>
<value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">NAME_LEO</value>
</entry>
</listParameter>



And i want to use this parameters por a next request.

<entry>
<key>BAS.basId</key>
<value xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">1007</value>
</entry>
<entry>
<key>BAS.value</key>
<value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">VALUE_LEO</value>
</entry>


Could you plz help me?

Thank you in advance

1 Reply

  • h_ixon's avatar
    h_ixon
    Occasional Contributor
    In your testSuite create a new PropertyTransfer step (don't forget to place it between your response and your new request steps).

    Fill a new name. Choose the "source" request and the "Response" property.
    Fill the code (don't forget to create namespace with the "ns" button)
    Check the "Use Xquery" box.

    To fill the code, for example in your code you want the 5th entry so below the namespace your have:

    //entry[5]/value


    Choose the Target request and the "Request" property. Fill the code (namespace and Xpath) to have this dynamic value in the correct field.

    It's the same things for the second fill (new property name) and the code will be the same except "[6]" instead of [5].


    I hope that will help you.