I tried the create instead of publish route, that didn't seem to have any
effect.

As for the ServerFactoryBean, I'm not quite sure how that works.  It seems
to only take a single address and I have multiple services hanging off the
same servlet.

- will

-----Original Message-----
From: Daniel Kulp [mailto:[email protected]] 
Sent: Friday, December 11, 2009 4:13 PM
To: [email protected]
Cc: Will Johnson
Subject: Re: implementor - multiple @WebService implemented interfaces


Two thoughts:

1) This MIGHT work if you use "Endpoint.create(...)" instead of 
"Endpoint.publish(...)"  and then call publish on the endpoint after setting

the properties.    By the time "Endpoint.publish(..)" returns, everything is

completely setup.

2) You SHOULD be able to do this if you use the JaxWsServerFactoryBean
instead 
of using the Endpoint/EndpointImpl things.   

See the docs on the simple front end:
http://cxf.apache.org/docs/simple-frontend.html
which uses the ServerFactoryBean (the superclass of JaxWsServerFactoryBean) 
for some ideas.

Dan



On Fri December 11 2009 2:56:05 pm Will Johnson wrote:
> I've been using cxf for a while now and everything is going well until I
> tried to have a class implement two different web service interfaces.  For
> example:
> 
> 
> 
> @WebService
> 
> public interface Foo {  .  }
> 
> 
> 
> @WebService
> 
> public interface Bar {  .  }
> 
> 
> 
> public class MyService implements Foo, Bar { .. }
> 
> 
> 
> I then tried to do something like the following:
> 
> 
> 
> EndpointImpl endpointImpl = (EndpointImpl) Endpoint.publish("foo",
> myService);
> 
> endpointImpl.setImplementorClass(Foo.class);
> 
> endpointImpl.setBus(bus);
> 
> 
> 
> // now publish the same implementor but with a different ws interface
> 
> endpointImpl = (EndpointImpl) Endpoint.publish("bar", myService);
> 
> endpointImpl.setImplementorClass(Bar.class);
> 
> endpointImpl.setBus(bus);
> 
> 
> 
> However I always end up with the same service descriptor registered under
> two names (the WSDL for Foo registered for both "/foo" and "/bar").  Is
> there a way to tell cxf/jaxws to generate the wsdl from a specific
>  interface definitions instead of the implementor class?
> 
> 
> 
> -          will
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to