Hi,

If my XML stream response looks as following:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Invalid application client.</faultstring>
      <detail>
        <InvalidAuthenticationException xmlns="urn:SecurityServer">
          <cause xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance";
ns1:nil="true"
            xmlns="http://exception.com"; />
          <messages xmlns="http://exception.com";>
            <string>Invalid application client.</string>
          </messages>
          <throwableCount xmlns="http://exception.com";>1</throwableCount>
          <throwables xmlns="http://exception.com";>
            <ns1:Throwable xmlns:ns1="http://lang.java"; />
          </throwables>
        </InvalidAuthenticationException>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

How can I convert it into a java Object with Axis2? Doing it as following is
the correct way or am I completely wrong?

XMLStreamReader reader
XMLInputFactory.newInstance().createXMLStreamReader(new
StringReader(response));
OMElement element = new StAXOMBuilder(reader).getDocumentElement();

BeanUtil.deserialize(element, new Object[] {Fault.class}, new
DefaultObjectSupplier());

Any help would be gratefully appreciated. Thanks a lot and have a nice day.
Cheers,

christian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to