Hi all,
Can I have multiple endpoints in one cxf.xml?
1. For example in my "cxf.xml" configuration:
<beans>
...
<jaxws:endpoint id="example1"
implementor="com.example.business.Example1"
serviceName="Example1Service"
address="/Example1WS">
</jaxws:endpoint>
<jaxws:endpoint id="example2"
implementor="com.example.business.Example2"
serviceName="Example2Service"
address="/Example2WS">
</jaxws:endpoint>
</beans>
2. After start Tomcat, I DO can visit both:
http://localhost:8080/example/services/Example1WS
http://localhost:8080/example/services/Example2WS
3. But in my "Client.java", I just cannot dynamicly create "Example1". It seems it will create "Example2" in this example
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
factory.setServiceClass(Example1.class);
factory.setAddress(url + "/Example1WS");
Example1 client = (Example1) factory.create();
4. However, if I remove "Example2" endpoint in "cxf.xml", re-start Tomcat and it works fine with "Client.java" as shown above.
Is it something wrong in my cxf.xml?
Or is it restrained to use JaxWsProxyFactoryBean? Please help!
Many thanks,
George