Hi all,
I am new to CXF and will be very appreciated if you can help me.
Can I have more than one endpoint per servlet?
1. For example: my "cxf.xml":
<beans>
...
<jaxws:endpoint id="example1"
implementor="com.example.business.Example1"
serviceName="Example1Service"
address="/Example1WS"/>
<jaxws:endpoint id="example2"
implementor="com.example.business.Example2"
serviceName="Example2Service"
address="/Example2WS"/>
</beans>
2. Start Tomcat, I DO can visit both:
http://localhost:8080/example/services/Example1WS
http://localhost:8080/example/services/Example2WS
3. In my "Client.java"
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();
client.doSomething();
4. The error messages:
Exception in thread "AWT-EventQueue-0"
javax.xml.ws.soap.SOAPFaultException: Could not send Message.
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
at $Proxy47.doSomething(Unknown Source)
Tomcat:
INFO: Servlet transport factory already registered
5. However, if I remove "Example2" endpoint in the "cxf.xml",
re-start Tomcat and it works fine.
Please help!
Many thanks,
George
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.