tags:

views:

228

answers:

0

The wsdl as following:

<xs:complexType name="GetCompositionDto"> <xs:complexContent>
<xs:extension base="tns:baseDto">
<xs:sequence>
<xs:element minOccurs="0" name="itemCode" type="xs:string"/>
<xs:element minOccurs="0" name="compositionVersion" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

After I updated the CXF the jars. from cxf-2.1.4, jaxb-Impl-2.1.9, jaxb-xjc-2.1.9 To cxf-2.2.7, jaxb-Impl-2.1.12, jaxb-xjc-2.1.12.

When I request the XML with following:

<itemCode>aa</itemCode>
<compositionVersion>bb</compositionVersion>
<h>22</h> --- extra element

Displays Errors: Unmarshalling Error: unexpected element (uri:"", local:"h"). Expected elements are <{}itemCode>,<{}compositionVersion>

I know the 'h' doesn't map the element in WSDL. But It's OK in the cxf-2.1.4 version.

How can i solve this problem? thanks.