Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4181

CXF error when parsing a SOAP 1.2 fault: Invalid QName in mapping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.2
    • 2.4.7, 2.5.3
    • Soap Binding
    • None
    • Unknown

    Description

      When receiving the following SOAP 1.2 fault, a parsing error occurs in Soap12FaultInInterceptor:
      <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
      xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"
      xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">
      <S:Body>
      <S:Fault>
      <S:Code>
      <S:Value>S:Sender</S:Value>
      <S:Subcode>
      <S:Value>wst:FailedAuthentication</S:Value>
      </S:Subcode>
      </S:Code>
      <S:Reason>
      <S:Text xml:lang="en-US">Authentication Failure</S:Text>
      </S:Reason>
      <S:Detail>
      <psf:error>
      <psf:value>0x80048821</psf:value>
      <psf:internalerror>
      <psf:code>0x80041012</psf:code>
      <psf:text>The entered and stored passwords do not match. </psf:text>
      </psf:internalerror>
      </psf:error>
      </S:Detail>
      </S:Fault>
      </S:Body>
      </S:Envelope>

      Stack trace:
      java.lang.RuntimeException: Invalid QName in mapping: wst:FailedAuthentication
      at org.apache.cxf.helpers.XMLUtils.getQName(XMLUtils.java:447)
      at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.unmarshalFault(Soap12FaultInInterceptor.java:88)
      at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.handleMessage(Soap12FaultInInterceptor.java:59)
      at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.handleMessage(Soap12FaultInInterceptor.java:46)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
      at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
      at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:799)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1494)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1402)
      at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:195)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
      at org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:708)
      at org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:584)
      at org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:576)
      at net.entropysoft.eci.sharepoint.webservices.SharepointWebServices.authenticateToSharePointOnline(SharepointWebServices.java:426)

      This happens because Soap12FaultInInterceptor creates a new DOM document with the Fault element but omits the namespace declarations on parent nodes (Envelope and Body).

      Attachments

        1. staxdomtest.diff
          3 kB
          Akitoshi Yoshida
        2. SoapFaultSerializerTest.java.diff
          2 kB
          Carlos Rodriguez

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              raph Raphael Jean
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: