4

I have a trouble in Apache CXF where some code throws SOAPFaultException.

My original SOAP response is as following :

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope ...>
  <soap:Header>
    <awsse:Session TransactionStatusCode="InSeries">
      <awsse:SessionId>012GBF5W3H</awsse:SessionId>
      <awsse:SequenceNumber>1</awsse:SequenceNumber>
      <awsse:SecurityToken>3CGFFDO499VDB7WTRT37R6HPV</awsse:SecurityToken>
    </awsse:Session>
  </soap:Header>
  <soap:Body>
    <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <faultcode>soap:Client</faultcode>
      <faultstring>SOME_FAULT_STRING</faultstring>
      <faultactor>SOME_FAULT_FACTOR</faultactor>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

I receive later a SOAPFaultException with information contains only soap:Body/soap:Fault. However, I need information from soap:Header section for further processing.

How can I pass these Header information to SOAPFaultException?

demonplus
  • 5,613
  • 12
  • 49
  • 68

0 Answers0