Forum Discussion

singhtester's avatar
singhtester
Contributor
14 years ago

issue in getnode value script on xml response? any plz

Hi

Is my script to get node value from the response correct.I am not able to get.I am adding this in Property transfer to store in variable, to be used in corresponding tests.

declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='http://demoexample.com/';
//ns1:testLogOnResponse[1]/testLogOnResult[1]/time[1]


My XML response:
================
<testLogOnResponse xmlns="http://demoexample.com/">
<testLogOnResult>
<time>1329928021357</time>
<status>true</status>
<TSviewer>537804597898115108</TSviewer>
<othercookies>
<CookiesArrayEntry>
<name>ibssid</name>
<val>13b7e5e42fff4080a4899ddb940d8dbd7b7d3c962037a516d87c83e62cd3e8ca</val>
</CookiesArrayEntry>
</othercookies>
<dosignon>false</dosignon>
</testLogOnResult>
</testLogOnResponse>

Thanks,
GS
  • Admin,

    Can this be transferred to "soapUI Community Board". I paced my question in wrong place it seems.

    sorry & Thanks.
    GS
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Does it work when you put the prefix on all elements?

    //ns1:testLogOnResponse[1]/ns1:testLogOnResult[1]/ns1:time[1]

    Or if there is no possibility of other time elements, just

    //ns1:time[1]