Hi,
You have to make sure that the client side and server side is using the
same SEI,
I'm not sure where's the stacetrace come from, client or server?
probably the client
From the stacktrace you gave looks like it still looking for the
original method which you renamed in the jaxws binding at the wsdl2java
phase?
I guess your client using wsdl first approach? at the runtime, it'll not
load the binding file, that's why it's failed.
Like Jim said in another mail, you should try the latest stable version
of cxf, And I also remember that it's been fixed.
Regards,
James
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