On Oct 20, 2013, at 6:18 AM, Andrei Shakirin <[email protected]> wrote:

> URL should be unique per service endpoint, you are not able to publish 
> multiple endpoints to single URL.
> (CXF will generate something like java.lang.RuntimeException: Soap 1.1 
> endpoint already registered on address <URL>).
> I think only way to achieve that is redesign your service to provide  
> different operations for Quote and Group.

There IS another way built into CXF, but it's not easy to do.

If you add a property of "allow-multiplex-endpoint", Boolean.TRUE to the 
endpoint, then CXF will allow publishing of multiple endpoints on the same URL. 
  However, you will then need to write an AbstractEndpointSelectionInterceptor 
that would look at the payload or actions or something to determine which 
endpoint to actually dispatch to.  There is some code in:  
http://svn.apache.org/repos/asf/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/

that may be usable as a starting point.    

That said, this is definitely a very very edge case that is really not tested 
or supported well in CXF at all.   You're kind of on your own with it.  You may 
need to dig through code a bit to figure out how to configure in your endpoint 
selection interceptor, etc..     I'm also not sure how the endpoint selection 
stuff would interact with things like the WSDL GET support.   I have no idea 
which WSDL you would get.



Dan




> 
> Regards,
> Andrei.
> 
>> -----Original Message-----
>> From: reena upadhyay [mailto:[email protected]]
>> Sent: Donnerstag, 17. Oktober 2013 11:04
>> To: [email protected]
>> Subject: How to register multiple endpoints on a same address in apache cxf
>> JAXWS
>> 
>> I have published two end points (Soap web service) using apache cxf. I am
>> using a code first approach for web service development. Right now when I
>> deploy the war of my application on Tomcat server, the wsdl is getting
>> generated on two different URL.
>> 
>> <jaxws:endpoint id="LocationService" implementor="#location"
>> address="/Location" />
>> <jaxws:endpoint id="groupService" implementor="#group"
>> address="/Quote" />
>> 
>> http://localhost:8080/exemplar/Quote?wsdl
>> http://localhost:8080/exemplar/Group?wsdl
>> 
>> I want that this two end points should get register to a single address so 
>> that I
>> have only one wsdl for my application.
>> 
>> Is there any way to do it?

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to