What annotations do you have on the object that would map to test_data_model?
It LOOKS like you have an XmlRootElement annotation on there, but no XmlType annotation (or XmlType with name=""). In addition, in your @WebParam and @WebResult annotations on your service, you would likely need to add the correct names and namespaces of the elements that are expected. You don't seem to have them there so it's using the JAX-WS defaults of "arg0" in no namespace. Dan On Mar 15, 2013, at 4:27 PM, rymonroe <[email protected]> wrote: > We have recently upgraded to cxf-2.7.3 from cxf-2.3.1. We still have a legacy > client useing 2.3.1. When they try to access our webservice, they get the > following error. > > Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: > Unmarshalling Error: unexpected element > (uri:"http://server.testService.test.hp.com/", local:"test_data_model"). > Expected elements are <{}arg0> > > I am unable to change anthing on the client side, only on the server side. > Below is our generated WSDL with cxf2.7.1. I have scoured google for a > solution to this question for the last couple of days and found nothing that > helps. Does anyone have any suggestions? Thanks. > > <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://server.testService.test.hp.com/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="testService" > targetNamespace="http://server.testService.test.hp.com/"> > <wsdl:types> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:tns="http://server.testService.test.hp.com/" > elementFormDefault="unqualified" > targetNamespace="http://server.testService.test.hp.com/" version="1.0"> > <xs:element name="calculateSum" type="tns:calculateSum"/> > <xs:element name="calculateSumOnTestDataModel" > type="tns:calculateSumOnTestDataModel"/> > <xs:element name="calculateSumOnTestDataModelResponse" > type="tns:calculateSumOnTestDataModelResponse"/> > <xs:element name="calculateSumResponse" type="tns:calculateSumResponse"/> > <xs:element name="test_data_model"> > <xs:complexType> > <xs:sequence> > <xs:element name="processing_information" > type="tns:processing-information"/> > <xs:element name="cte_document" type="tns:cte-document"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:complexType name="calculateSumOnTestDataModel"> > <xs:sequence> > <xs:element minOccurs="0" name="arg0"> > <xs:complexType> > <xs:sequence> > <xs:element name="processing_information" > type="tns:processing-information"/> > <xs:element name="cte_document" type="tns:cte-document"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:sequence> > </xs:complexType> > <xs:complexType name="processing-information"> > <xs:sequence> > <xs:element minOccurs="0" name="doc_num" type="xs:string"/> > <xs:element minOccurs="0" name="doc_date" type="xs:string"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="cte-document"> > <xs:sequence> > <xs:element name="number1" type="xs:string"/> > <xs:element name="number2" type="xs:string"/> > <xs:element minOccurs="0" name="product" type="xs:string"/> > <xs:element minOccurs="0" name="sum" type="xs:string"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="calculateSumOnTestDataModelResponse"> > <xs:sequence> > <xs:element minOccurs="0" name="return"> > <xs:complexType> > <xs:sequence> > <xs:element name="processing_information" > type="tns:processing-information"/> > <xs:element name="cte_document" type="tns:cte-document"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:sequence> > </xs:complexType> > <xs:complexType name="calculateSum"> > <xs:sequence> > <xs:element minOccurs="0" name="arg0" type="xs:string"/> > </xs:sequence> > </xs:complexType> > <xs:complexType name="calculateSumResponse"> > <xs:sequence> > <xs:element minOccurs="0" name="return" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:schema> > </wsdl:types> > <wsdl:message name="calculateSumOnTestDataModel"> > <wsdl:part element="tns:calculateSumOnTestDataModel" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="calculateSum"> > <wsdl:part element="tns:calculateSum" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="calculateSumOnTestDataModelResponse"> > <wsdl:part element="tns:calculateSumOnTestDataModelResponse" > name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="calculateSumResponse"> > <wsdl:part element="tns:calculateSumResponse" name="parameters"> > </wsdl:part> > </wsdl:message> > <wsdl:portType name="TestService"> > <wsdl:operation name="calculateSumOnTestDataModel"> > <wsdl:input message="tns:calculateSumOnTestDataModel" > name="calculateSumOnTestDataModel"> > </wsdl:input> > <wsdl:output message="tns:calculateSumOnTestDataModelResponse" > name="calculateSumOnTestDataModelResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="calculateSum"> > <wsdl:input message="tns:calculateSum" name="calculateSum"> > </wsdl:input> > <wsdl:output message="tns:calculateSumResponse" > name="calculateSumResponse"> > </wsdl:output> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="testServiceSoapBinding" type="tns:TestService"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="calculateSumOnTestDataModel"> > <soap:operation soapAction="" style="document"/> > <wsdl:input name="calculateSumOnTestDataModel"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="calculateSumOnTestDataModelResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="calculateSum"> > <soap:operation soapAction="" style="document"/> > <wsdl:input name="calculateSum"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="calculateSumResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="testService"> > <wsdl:port binding="tns:testServiceSoapBinding" > name="TestServiceImplPort"> > <soap:address > location="http://localhost:30000/testService/services/testService"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Backwards-compatiblity-between-cxf-2-7-3-and-cxf-2-3-1-tp5724643.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
