You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Tuan HA TRAN <tu...@traveldoo.com> on 2015/10/08 14:36:23 UTC

How to retrieve SOAP response header in a SOAPFaultException

Hello everybody,
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?

Thank you so much your for helps

Ha