I created a client for a web service using CXF wsdl2java.
The client connects to OK, but gives out a temptation complaining that the answer found does not match the expected answer.
May 22, 2013 3:44:46 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://www.service-now.com/cmdb_ci_comm}ServiceNow_cmdb_ci_comm from WSDL: file:/C:/Dev/Workspaces/Eclipse/clim20130508/ServiceNowCXFClient/bin/service-now.wsdl Invoking getRecords... May 22, 2013 3:44:51 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://www.service-now.com/foo}ServiceNow_foo
Obviously, the response received differs from the expected answer in that the latter includes a namespace.
getRecordsResponse found. Expected {http://www.service-now.com/foo}getRecordsResponse
My service client opens as follows:
@WebServiceClient(name = "ServiceNow_foo", wsdlLocation = "service-now.wsdl", targetNamespace = "http://www.service-now.com/foo") public class ServiceNowFoo extends Service { public final static URL WSDL_LOCATION; public final static QName SERVICE = new QName("http://www.service-now.com/foo", "ServiceNow_foo"); public final static QName ServiceNowSoap = new QName("http://www.service-now.com/foom", "ServiceNowSoap");
You can see the client code in the question How to configure a CXF-generated client for proactive HTTP authentication?
Any ideas on what is the wrong configuration?
source share