JAXM soap message parsing

Posted by Dean on Stack Overflow See other posts from Stack Overflow or by Dean
Published on 2008-11-17T17:10:43Z Indexed on 2010/06/01 18:53 UTC
Read the original article Hit count: 179

Filed under:
|
|

I am getting the following XML back from a .net service:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <validateCredentialsResponse 
               xmlns="http://www.paragon.com/positionmonitor/PositionMonitor">
            <validateCredentialsResult>
                <ResultData xsi:type="ValidateCredentialsResultData">
                    <validated>true</validated>
                    <alreadyLoggedIn>false</alreadyLoggedIn>
                </ResultData>
                <Status>
                    <Condition xmlns="">SUCCESS</Condition>
                    <ErrorCode xmlns="">BO.00000</ErrorCode>
                    <ErrorDesc xmlns="">OK</ErrorDesc>
                </Status>
            </validateCredentialsResult>
        </validateCredentialsResponse>
    </soap:Body>
</soap:Envelope>

...and I'm trying to parse it using JAXM, however the following always evaluates to null:

SOAPEnvelope env = reply.getSOAPPart().getEnvelope();

Can anyone help me out here?

© Stack Overflow or respective owner

Related posts about java

Related posts about web-services