On Fri December 11 2009 5:14:14 pm Will Johnson wrote:
> I tried the create instead of publish route, that didn't seem to have any
> effect.

Hmm. .  That's not good.   Can you create a small sample that demonstrates 
that and log a bug?    That SHOULD have worked, I think.


> 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.

You would create a new JaxWsServerFactoryBean for each address you want 
something deployed on.     You can create a bunch of them each with different 
(or same) impls and with different addresses.

Basically, in theory, Endpoint.create just creates a JaxWsServerFactoryBean 
(and a few other supporting objects) and wrappers it with the EndpointImpl.    
The publish then calls off to the JaxWsServerFactoryBean to do the real work.   
That is why the Endpoint.create thing SHOULD have worked.

Dan




> 
> - will
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dk...@apache.org]
> Sent: Friday, December 11, 2009 4:13 PM
> To: users@cxf.apache.org
> 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
dk...@apache.org
http://www.dankulp.com/blog

Reply via email to