Search code examples
xpathpropertiesnullsoapuitransfer

Getting Null returned in Property Transfer in SoapUI


I am getting null returned, I am going in circles, fiddling pointlessly. I have it working with an older version of the WSDL, trying to get it going with a newer version, generated from Jax-WS, was using Axis. There have been some minor changes. I want to get the value "6001305" from Response. I am hoping someone will spot the problem. I am pretty sure the Target is fine, it's pretty simple. I am not very fluent at all.

Response I am working with:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:requestPortResponse xmlns:ns2="http://transferobjects.abc.abc.org">
         <return so="6001305" state="Awaiting Response">
            <success>true</success>
         </return>
      </ns2:requestPortResponse>
   </soap:Body>
</soap:Envelope>

My setup for Source (Property Response, Path Language XPath)

declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='http://abc.abc.org/api/serviceorder';
declare namespace ns2='http://transferobjects.abc.abc.org';
//ns2:requestPortResponse/return/so

Solution

  • You are missing an @ before your so to indicate that it's an attribute. So your whole line should be

    //ns2:requestPortResponse/return/@so