Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-656

HTTP component doesn't correctly manage namespace

    XMLWordPrintableJSON

Details

    Description

      I have a CXF-SE endpoint exposing a WSDL. I "expose" this CXF-SE endpoint using a HTTP SU and a CXF-BC SU.

      The complete test case is available here:
      http://svn.nanthrax.net/cxfse-ns-test/

      Using soapUI, I generate the soap env request which looks like this:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nan="http://www.nanthrax.net">
      <soapenv:Header/>
      <soapenv:Body>
      <nan:echo>
      <!-Optional:->
      <request>
      <!-Zero or more repetitions:->
      <arguments>-t</arguments>
      <arguments>-r</arguments>
      <!-Optional:->
      <operation>test</operation>
      </request>
      </nan:echo>
      </soapenv:Body>
      </soapenv:Envelope>

      I send this soap envelope to the HTTP and CXF-BC: it's working fine, I got the expected soap env response.

      Now, I change the soap env request to remove the namespace prefix. The new soap env looks like this:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
      <soapenv:Header/>
      <soapenv:Body>
      <echo xmlns="http://www.nanthrax.net">
      <!-Optional:->
      <request xmlns="">
      <!-Zero or more repetitions:->
      <arguments>-t</arguments>
      <arguments>-r</arguments>
      <!-Optional:->
      <operation>test</operation>
      </request>
      </echo>
      </soapenv:Body>
      </soapenv:Envelope>

      If I send this to CXF-BC, it's working fine (as expected ).

      But if I send it to the HTTP endpoint, CXF-SE can unmarshal the request and the object is null.

      Here's the debug log when submitting the soap env via the HTTP endpoint:

      DEBUG - HttpSoapConsumerMarshaler - Using default request content encoding.
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapInInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapActionInOperationInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.wsdl.WsdlOperationInInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.bindings.soap.interceptors.MustUnderstandInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.jbi.JbiInWsdl1Interceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.jbi.JbiInInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapInIntercept
      or
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapActionInOpe
      rationInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.wsdl.WsdlOperationInIntercept
      or
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.bindings.soap.interceptors.MustUnderstandI
      nterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.jbi.JbiInWsdl1Interceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.jbi.JbiInInterceptor
      DEBUG - HttpComponent - Created correlation id: ID:127.0.1.1-124593a6cfe-14:0
      DEBUG - DeliveryChannelImpl - Send ID:127.0.1.1-124593a6cfe-14:0 in DeliveryChannel

      {servicemix-http}

      DEBUG - SecuredBroker - send exchange with secure broker
      DEBUG - SecuredBroker - service name :

      {http://www.nanthrax.net}

      Echo
      DEBUG - SecuredBroker - operation name :

      {http://www.nanthrax.net}

      echo
      DEBUG - SedaFlow - Called Flow send
      DEBUG - HttpComponent - Suspending continuation for exchange: ID:127.0.1.1-124593a6cfe-14:0
      DEBUG - SedaQueue - org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@49f9fa dequeued exchange: InOut[
      id: ID:127.0.1.1-124593a6cfe-14:0
      status: Active
      role: provider
      service:

      {http://www.nanthrax.net}

      Echo
      endpoint: EchoImplPort
      operation:

      {http://www.nanthrax.net}

      echo
      in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://www.nanthrax.net" name="echo" type="msg:echo" version="1.0"><jbi:part><echo xmlns="http://www.nanthrax.net">

      <request>

      <arguments>-t</arguments>
      <arguments>-r</arguments>

      <operation>test</operation>
      </request>
      </echo></jbi:part></jbi:message>
      ]
      DEBUG - CxfSeComponent - Received exchange: status: Active, role: provider
      DEBUG - CxfSeComponent - Retrieved correlation id: ID:127.0.1.1-124593a6cfe-14:0
      INFO - JBITransportFactory - configuring DeliveryChannel: org.apache.servicemix.common.EndpointDeliveryChannel@2a7640
      ERROR - EchoImpl - Request is null.
      INFO - PhaseInterceptorChain - Application has thrown exception, unwinding now Request is null.
      DEBUG - DeliveryChannelImpl - Send ID:127.0.1.1-124593a6cfe-14:0 in DeliveryChannel

      {servicemix-cxf-se}

      DEBUG - SecuredBroker - send exchange with secure broker
      DEBUG - SedaFlow - Called Flow send
      DEBUG - SedaQueue - org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@11e31ea dequeued exchange: InOut[
      id: ID:127.0.1.1-124593a6cfe-14:0
      status: Error
      role: consumer
      interface:

      {http://www.nanthrax.net}

      Echo
      service:

      {http://www.nanthrax.net}

      Echo
      endpoint: EchoImplPort
      operation:

      {http://www.nanthrax.net}

      echo
      in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://www.nanthrax.net" name="echo" type="msg:echo" version="1.0"><jbi:part><echo xmlns="http://www.nanthrax.net">

      <request>

      <arguments>-t</arguments>
      <arguments>-r</arguments>

      <operation>test</operation>
      </request>
      </echo></jbi:part></jbi:message>
      error: org.apache.cxf.interceptor.Fault: Request is null.
      ]
      DEBUG - HttpComponent - Received exchange: status: Error, role: consumer
      DEBUG - HttpComponent - Retrieved correlation id: ID:127.0.1.1-124593a6cfe-14:0
      DEBUG - HttpComponent - Resuming continuation for exchange: ID:127.0.1.1-124593a6cfe-14:0
      DEBUG - JettyContextManager - Dispatching job: RetryContinuation@23214048,pending,resumed
      DEBUG - HttpComponent - Receiving HTTP request: POST /nanthrax/echo/ HTTP/1.1
      Content-Type: text/xml;charset=UTF-8
      SOAPAction: ""
      User-Agent: Jakarta Commons-HttpClient/3.1
      Host: localhost:8192
      Content-Length: 471

      DEBUG - HttpSoapConsumerMarshaler - Using default response content encoding.
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.interceptors.xml.StaxOutInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapOutInterceptor
      DEBUG - PhaseInterceptorChain - Adding interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapFaultOutInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.xml.StaxOutInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapOutInterceptor
      DEBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.bindings.soap.interceptors.SoapFaultOutInterceptor

      Attachments

        Activity

          People

            jb@nanthrax.net Jean-Baptiste Onofré
            jb@nanthrax.net Jean-Baptiste Onofré
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: