SOAP web service client does not add namespace to SOAP message on EAP 6

Solution Unverified - Updated -

Issue

  • A SOAP client deployed on EAP does not declare the namespace as expected on SOAP body child elements.
  • Expected:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <ns2:OperationA xmlns="http://ws.samples.redhat.com/"
              xmlns:ns2="http://ws.samples.redhat.com/">
          <MyData1>...</MyData1>
        </ns2:OperationA>
      </soap:Body>
    </soap:Envelope>
    
  • Actual:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <ns2:OperationA xmlns:ns2="http://ws.samples.redhat.com/">
          <MyData1>...</MyData1>
        </ns2:OperationA>
      </soap:Body>
    </soap:Envelope>
    
  • And when I force SoapUI to submit the expected SOAP request that has the namespace declaration (xmlns="http://ws.samples.redhat.com/"), it gets the following error message in the server log:

    org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://ws.samples.redhat.com/", local:"MyData1"). Expected elements are <{}MyData1>
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content