[jboss-user] [JBoss Web Services] - Handling message parts defined in SOAP header with CXF

Gary Brown do-not-reply at jboss.com
Fri Apr 15 09:19:44 EDT 2011


Gary Brown [http://community.jboss.org/people/objectiser] created the discussion

"Handling message parts defined in SOAP header with CXF"

To view the discussion, visit: http://community.jboss.org/message/600306#600306

--------------------------------------------------------------
Hi

I have a BPEL process that receives a message through jbossws-native (JBossAS 5.1, JBWS-native 3.2.2.GA). The WSDL definition of the message maps a value from the SOAP header as being a message part, as shown here:


  <wsdl:message name="HelloMessage">
    <wsdl:part name="ID" element="types:SessionIdentity"/>
    <wsdl:part name="Message" type="xsd:string"/>
  </wsdl:message>
 ....
  <wsdl:portType name="HelloGoodbyePortType">
    <wsdl:operation name="hello">
      <wsdl:input message="tns:HelloMessage" name="HelloIn"/>
      <wsdl:output message="tns:HelloMessage" name="HelloOut"/>
    </wsdl:operation>
 ....
  <wsdl:binding name="HelloGoodbyeSoapBinding" type="tns:HelloGoodbyePortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="hello">
      <soap:operation soapAction="" style="rpc"/>
      <wsdl:input>
        <soap:body
            namespace="http://www.jboss.org/bpel/examples/wsdl"
            use="literal" parts="Message"/>
     <soap:header message="tns:HelloMessage"
            part="ID" use="literal"/>
      </wsdl:input>


With the following message it works fine:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
   <soapenv:Header>
    <ns:SessionIdentity xmlns:ns="http://www.jboss.org/bpel/examples/xsd">1</ns:SessionIdentity>
   </soapenv:Header>
   <soapenv:Body>
      <wsdl:hello>
         <Message>Hello</Message>
      </wsdl:hello>
   </soapenv:Body>
</soapenv:Envelope>


However if I run the same process with jbossws-cxf (version 3.2.2.GA), I get the fault response:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
     <soap:Body>
          <soap:Fault>
               <faultcode>soap:Server</faultcode>
               <faultstring>wrong number of arguments</faultstring>
          </soap:Fault>
     </soap:Body>
</soap:Envelope>


The problem also occurs in JBossAS 6, which I assume uses jbossws-cxf by default.

Is there something missing from the WSDL definition or doesn't CXF support this approach to accessing header info via message parts?

Regards
Gary
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/600306#600306]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110415/e298b1c1/attachment.html 


More information about the jboss-user mailing list