Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.6, 3.0.9
-
Unknown
Description
I have a regular service WSDL with a SOAP/HTTP binding.
I want to use the XML binding with the service, though. If I set up my service like this:
ServiceImpl implementor = new ServiceImpl(); JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); svrFactory.setServiceClass(ServiceInterface.class); svrFactory.setAddress(HTTP_ADDRESS); svrFactory.setServiceBean(implementor); svrFactory.setBindingId("http://cxf.apache.org/bindings/xformat");
everything works as expected. However, if I also add these three lines
svrFactory.setWsdlURL(wsdlUrl); svrFactory.setServiceName(new QName(SERVICE_NS, SERVICE_NAME)); svrFactory.setEndpointName(new QName(SERVICE_NS, PORT_NAME));
the the port definition from the WSDL takes precedence over the factory configuration, and the service expects a SOAP request. Other properties, like e.g. the transportId, get overridden just fine.
The same problem also seems to exist on the ClientFactoryBean side.
This used to work in CXF 2.x.