Hi Andrei, sorry I wasn't clear in my example, it was even wrong. The problem is when using the same base url, i.e. "http://localhost/service" and "http://localhost/service/v2". It seems as if the url mapping is for the address+anything after it, i.e. "http://localhost/server/*" which overrides "http://localhost/server/v2". I have still not found a solution for this. Regards, Dang
Hi, Multiple endpoints are supported out of the box. Take a look into integration tests, for example https://github.com/apache/cxf/blob/master/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerServer.java Server publishes the multiple endpoints. Regards, Andrei. From: [email protected] To: [email protected] Subject: Problem with multiple ports for one Service Date: Mon, 27 Jun 2016 19:00:31 +0000 I'm trying to develop a Server that serves two "services" using different ports in the WSDL, i.e.--- 8< --- <wsdl:service name="Service"> <wsdl:port name="ServicePort-v1" binding="service:ServiceBinding-v1"> <soap:address location="http://uri/Service/v1"/> </wsdl:port> <wsdl:port name="ServicePort-v2" binding="service:ServiceBinding-v2"> <soap:address location="http://uri/Service/v2"/> </wsdl:port> </wsdl:service>--- 8< --- I've implemented two services using:--- 8< --- @WebService ( serviceName = "Service", portName = "ServicePort-v1", wsdlLocation = "WEB-INF/Service.wsdl", targetNamespace = "http://uri/Service")public class MyService1 {...}--- 8< --- @WebService ( serviceName = "Service", portName = "ServicePort-v2", wsdlLocation = "WEB-INF/Service.wsdl", targetNamespace = "http://uri/Service")public class MyService2 {...}--- 8< --- And then starting the services using:--- 8< --- final Service1 implementor1 = new Service1(...); final JaxWsServerFactoryBean serverFactoryBean1 = new JaxWsServerFactoryBean(); serverFactoryBean1.setServiceClass(Service1.class); serverFactoryBean1.setAddress(address + "/v1"); serverFactoryBean1.setServiceBean(implementor1); serverFactoryBean1.getServiceFactory().setInvoker(new JAXWSMethodInvoker(implementor1)); Server server1 = serverFactoryBean1.create(); final Service2 implementor2 = new Service2(...); final JaxWsServerFactoryBean serverFactoryBean2 = new JaxWsServerFactoryBean(); serverFactoryBean2.setServiceClass(Service2.class); serverFactoryBean2.setAddress(address + "/v2"); serverFactoryBean2.setServiceBean(implementor2); serverFactoryBean2.getServiceFactory().setInvoker(new JAXWSMethodInvoker(implementor2)); Server server2 = serverFactoryBean2.create();--- 8< --- But only the second service is working. When I start them one at a time they're working so the underlying implementation is good. I can't seem to find a good way to create a Server that can route on multiple ports(WSDL-ports that is). I've searched long and hard but have yet to find any recent information on how to go about this and would be very grateful for any pointers. Regards, Dang
