I think my issue might be related to 
https://issues.apache.org/jira/browse/CXF-6319
<https://issues.apache.org/jira/browse/CXF-6319>  

As a client I receive a signed and encrypted message  with attachements. It
is just the body part encrypted and signed. Decryption works but I get this
error code:

Caused by: org.apache.wss4j.common.ext.WSSecurityException: The prefix
"soap" for element "soap:Fault" is not bound.
Original Exception was org.xml.sax.SAXParseException; lineNumber: 1;
columnNumber: 13; The prefix "soap" for element "soap:Fault" is not bound.
        at
org.apache.wss4j.dom.util.EncryptionUtils.decryptEncryptedData(EncryptionUtils.java:186)
        at
org.apache.wss4j.dom.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:550)
        at
org.apache.wss4j.dom.processor.EncryptedKeyProcessor.decryptDataRefs(EncryptedKeyProcessor.java:481)
        at
org.apache.wss4j.dom.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:199)
        at
org.apache.wss4j.dom.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:76)
        at
org.apache.wss4j.dom.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:429)
        at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:280)
        ... 50 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 13;
The prefix "soap" for element "soap:Fault" is not bound.
        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
        at
org.apache.xml.security.utils.XMLUtils$DocumentBuilderProxy.parse(XMLUtils.java:1114)
        at
org.apache.wss4j.dom.util.EncryptionUtils.decryptXopAttachment(EncryptionUtils.java:366)
        at
org.apache.wss4j.dom.util.EncryptionUtils.decryptEncryptedData(EncryptionUtils.java:179)

The raw response server message (before encryption and attachment), that the
client cannot parse, is:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Error</faultstring>
      <detail>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

I guess, that the encrypted body is attached read and DOM parsed seperatly
without namespace information, cause the "soap" namespace is declared in the
envelope.

BTW, the good out messsage works, it just not working for the fault
messages.

Is this a bug of cxf and how could I fixe it on the client side?

Versions: 
cxf-core 3.1.3 
cxr-rt-ws-security 3.1.3 
wss4j 2.1.2 
cxr-rt-ws-policy 3.1.3



--
View this message in context: 
http://cxf.547215.n5.nabble.com/WSS-Client-soap-fault-namespace-problem-tp5761485.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to