Hi all,
I have used wsdl2java with external binding file specified through -b. My
stubs for client have been generated correctly, but I got in trouble during
runtime.
The point is, that have renamed response properties names. But it seems that
cxf ignores jaxb annotations when handling the response wrapper.
More concretly
thanks to this part of external binding file:
<jaxws:bindings
node="wsdl:definitions/wsdl:types/xsd:[EMAIL
PROTECTED]'urn:sap-com:document:sap:soap:functions:mc-style']">
<jaxb:bindings
node="xsd:[EMAIL
PROTECTED]'ZBapiMaterialExistsMatnrResponse']/xsd:complexType/xsd:sequence/xsd:[EMAIL
PROTECTED]'MaterialFinnes']">
<jaxb:property name="existMark" />
</jaxb:bindings>
</jaxws:bindings>
this code is generated:
@XmlElement(name = "MaterialFinnes", required = true)
protected String existMark;
public String getExistMark() {
return existMark;
}
public void setExistMark(String value) {
this.existMark = value;
}
but when trying to use this client against some mockservice generated from the
same wsdl I got:
Caused by: java.lang.NoSuchMethodException:
cz.aura.isl.katalog.davky.control.sapnorway.sapnumberlookup.SapNumberLookupResponse.getMaterialFinnes()
at
org.apache.cxf.jaxb.WrapperHelper.getWrappedPart(WrapperHelper.java:194)
at
org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor.handleMessage(WrapperClassInInterceptor.java:136)
... 70 more
--
Jiri Mikulasek
---------------------------------
Developer
AURA, s.r.o.
Uvoz 499/56; 602 00 Brno
ISO 9001 certified company
AQAP 2110 (ČOS 051622)
tel./fax: +420 544 508 115
e-mail: [EMAIL PROTECTED]
http://www.aura.cz
---------------------------------