Hi there,

I have a doc/lit/bare service defined and my service is invoked with the
bare payload - the payload appears to be a W3C Element class (actually a
Xerces ElementNSImpl). This is reasonable I suppose; after all I did declare
the parameter to be bare so I guess CXF leaves it to me to unmarshall it. 

My first question is then - should CXF leave it to me to unmarshall the
parameter?

If the answer to the above is "yes" then can someone please provide me with
a pointer as to how to go about that (I'm wondering here if I can use the
same jaxb context as CXF is using - the context should know how to
unmarshall the data as my WSDL provides a complete definition).

Here's my interface:


@WebService(targetNamespace =
"http://schemas.blueglue.com.au/hrwebservices";)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface IndicativeDataService {
        void upload(
                        @WebParam(name = "IndicativeData", targetNamespace =
"http://ns.hr-xml.org/2007-04-15";) IndEmployeeRosterType data);
}


The WSDL looks great - just what I want - here's the message declaration:


  <wsdl:message name="upload">
    <wsdl:part name="IndicativeData" element="ns1:IndicativeData">
    </wsdl:part>
  </wsdl:message>


...and here's the referenced element (in the same wsdl):


    <xs:element name="IndicativeData" nillable="true"
type="tns:IndEmployeeRosterType"/>


Here is the lovely invocation; again, just what I want:


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:hrw="http://schemas.blueglue.com.au/hrwebservices";
xmlns:ns="http://ns.hr-xml.org/2007-04-15">
   <soapenv:Header/>
   <soapenv:Body>
      <hrw:upload>
         <ns:IndicativeData>
            <ns:Employer/>
            <ns:Employee changeType="Add">
               <ns:PersonInfo>
                  <ns:PersonId
idOwner="urn:x-au-com-blueglue:tjh-person">
                     <ns:IdValue>123</ns:IdValue>
                  </ns:PersonId>
                  <ns:PersonName>
                     <ns:GivenName>Jimmy</ns:GivenName>
                     <ns:FamilyName>Mathers</ns:FamilyName>
                  </ns:PersonName>
               </ns:PersonInfo>
            </ns:Employee>
         </ns:IndicativeData>
      </hrw:upload>
   </soapenv:Body>
</soapenv:Envelope>

Thanks for your help. Even confirming that "bare" parameters are passed
through unmarshalled will be helpful.

Kind regards,
Christopher

-- 
View this message in context: 
http://www.nabble.com/doc-lit-bare-service---how-to-unmarshall-the-elementnsimpl-tp19798742p19798742.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to