Basically, you need to do what Call#invoke does after the st.send() call.  You will 
need to create a SOAPMappingRegistry instance as part of this, and initialize it for 
any types beyond those implicitly supported (which is the same as RPC API users 
already do).

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "T.J. Hoo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 4:18 AM
Subject: How to parse SOAP response?


Hi!

I'm writing a standalone client to construct and send a SOAP message to a
server.
The response received from the server looks like the following:

    HTTP/1./1 200 OK
    ...
    <env:Envelope...>
      ...
      <env:Body>
        <Response>
          <Status>
            <Code>0</Code>
          </Status>
        </Response>
      </env:Body>
    </env:Envelope>


and currently, the program parses the response like the following:

    SOAPTransport st = msg.getSOAPTransport ();
    BufferedReader br = st.receive ();
    String line;
    while ((line = br.readLine ()) != null) {
      if (line.indexOf("<Code>0</Code") >= 0)
   return true;
    }
    return false;


the above code looks ugly and gross, and I want to know how to convert the
SOAP response into a XML document/Envelope object so that I'm able to lookup
the XML element value easily. Is this possible?


Reply via email to