Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-4292

CXF webservice proxy changing namespace attributes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix or Usage Issue
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Modules: CXF
    • Labels:
    • Environment:

      Appservers: Jetty, Websphere 6.1
      OS: Windows XP

    • User impact:
      High
    • Configuration:
      Hide

      <!-- NOTE: host, domain names have been changed from their actual values -->

      <service name="Eligibility">
      <inbound>

      <cxf:inbound-endpoint
      address="http://localhost:65080/services/Eligibility"
      proxy="true"
      wsdlLocation="Eligibility.wsdl"
      serviceName="Eligibility"
      synchronous="true">
      <property key="namespace" value="http://mydomain.com" />
      </cxf:inbound-endpoint>

      </inbound>

      <outbound>

      <pass-through-router>

      <cxf:outbound-endpoint
      address="http://remotehost.remotedomain.com/services/remote"
      transformer-refs="Transformers"
      proxy="true"
      synchronous="true" />

      </pass-through-router>

      </outbound>
      </service>

      Show
      <!-- NOTE: host, domain names have been changed from their actual values --> <service name="Eligibility"> <inbound> <cxf:inbound-endpoint address="http://localhost:65080/services/Eligibility" proxy="true" wsdlLocation="Eligibility.wsdl" serviceName="Eligibility" synchronous="true"> <property key="namespace" value="http://mydomain.com" /> </cxf:inbound-endpoint> </inbound> <outbound> <pass-through-router> <cxf:outbound-endpoint address="http://remotehost.remotedomain.com/services/remote" transformer-refs="Transformers" proxy="true" synchronous="true" /> </pass-through-router> </outbound> </service>
    • Log Output:
      Hide
      **** NOTE: This is the exception from the CLIENT, not Mule as Mule does not throw an exception in this case.



      Mar 31, 2009 7:31:22 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
      INFO: Interceptor has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:555)
      at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:64)
      at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
      at $Proxy38.readConsumerCrossReferenceId(Unknown Source)
      at com.mydomain.ConsumerWSAdapter_Eligibility_Client.main(ConsumerWSAdapter_Eligibility_Client.java:59)
      Caused by: javax.xml.bind.UnmarshalException
       - with linked exception:
      [com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]]
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:422)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
      ... 17 more
      Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]
      at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)
      at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473)
      at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:178)
      at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374)
      at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:215)
      at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:225)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358)
      ... 19 more
      Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:196)
      at $Proxy38.readConsumerCrossReferenceId(Unknown Source)
      at com.mydomain.ConsumerWSAdapter_Eligibility_Client.main(ConsumerWSAdapter_Eligibility_Client.java:59)
      Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:555)
      at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:64)
      at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
      ... 2 more
      Caused by: javax.xml.bind.UnmarshalException
       - with linked exception:
      [com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]]
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:422)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
      ... 17 more
      Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")
       at [row,col {unknown-source}]: [1,1601]
      at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)
      at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473)
      at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:178)
      at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374)
      at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:215)
      at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:225)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358)
      ... 19 more
      Show
      **** NOTE: This is the exception from the CLIENT, not Mule as Mule does not throw an exception in this case. Mar 31, 2009 7:31:22 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601] at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:555) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:64) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178) at $Proxy38.readConsumerCrossReferenceId(Unknown Source) at com.mydomain.ConsumerWSAdapter_Eligibility_Client.main(ConsumerWSAdapter_Eligibility_Client.java:59) Caused by: javax.xml.bind.UnmarshalException  - with linked exception: [com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601]] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:422) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628) ... 17 more Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601] at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473) at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:178) at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374) at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:215) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:225) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358) ... 19 more Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:196) at $Proxy38.readConsumerCrossReferenceId(Unknown Source) at com.mydomain.ConsumerWSAdapter_Eligibility_Client.main(ConsumerWSAdapter_Eligibility_Client.java:59) Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601] at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:555) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:64) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178) ... 2 more Caused by: javax.xml.bind.UnmarshalException  - with linked exception: [com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601]] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:422) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628) ... 17 more Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")  at [row,col {unknown-source}]: [1,1601] at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473) at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:178) at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374) at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:215) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:225) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358) ... 19 more
    • Similar Issues:

      Description

      I am proxying a remote webservice using Mule/CXF. The XSI namespace in the response SOAP message from the remote webservice is getting changed from:

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      to:

      xmlns:xsi="xsi"

      This results in the following error on the client side when calling the proxy:

      Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi" (for attribute "nil")
      at [row,col

      {unknown-source}

      ]: [1,1601]

      I have been able to confirm that Mule/CXF is inserting the incorrect XSI namespace, not the remote web service. When I call the remote service directly using SoapUI the XSI namespace is correct.

      It is of note that a similar problem seems to be occuring with Service Mix, so this may be a problem with CXF itself.

      I have tried to change the namespace in the resulting message using an XSL stylesheet but have so far been unsuccessful.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evangelinamrm Evangelina Martinez Ruiz Moreno
                Reporter:
                scottrainaldo Scott Rainaldo
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: