如何在Apache CXF中的SOAPFaultException中检索SOAP响应头

时间:2015-10-08 12:30:25

标签: soap cxf soapfault

我在Apache CXF中遇到问题,其中一些代码抛出SOAPFaultException

我原来的SOAP响应如下:   



<?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>
&#13;
&#13;
&#13;

我稍后收到SOAPFaultException信息,其中只包含soap:Body / soap:Fault。但是,我需要来自soap:Header部分的信息以供进一步处理。

如何将这些标头信息传递给SOAPFaultException

0 个答案:

没有答案