Hi,

I would like to extract the return (currently false) value from the following XML:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:isPumpOnResponse xmlns:ns="http://webservice.whatever">
         <ns:return>false</ns:return>
      </ns:isPumpOnResponse>
   </soapenv:Body>
</soapenv:Envelope>

Is there a way of getting it out of the SOAPMessage object?

SOAPMessage soapResponse = soapConnection.call(createSOAPRequest(webMethodName), url);

Thanks.

You have to parse the message, and find the <ns:return>...</ns:return> value (where the ... is). IE, this is the return value for the call. If this SOAP call returns more data that just a boolean true/false value, you need to do more work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.