That's it! Thanks a lot.
I set up the service with, e.g.:
String address = "http://localhost:9000/helloWorld";
Endpoint.publish(address, new MyProvider());
address = "http://localhost:9000/goodbyeWorld";
Endpoint.publish(address, new MyProvider());
Where MyProvider is a simple class:
@WebServiceProvider()
@ServiceMode(value = Service.Mode.PAYLOAD)
public class MyProvider implements Provider<DOMSource> {
public DOMSource invoke(DOMSource request) {
System.out.println("IN THE WEB SERVICE");
return new DOMSource();
}
}
Then, any operation I call on either of the services is routed to this
class.
Cheers,
Dave
On Tue, Jan 27, 2009 at 3:40 PM, Andrew Clegg <[email protected]>wrote:
> 2009/1/27 Dave Burford <[email protected]>:
> > The problem with this is that I don't have an implementor for the
> endpoint
> > ... the call will be picked up and acted on by my custom Invoker (which
> will
> > handle all of the operations on all of my web services in a generic
> > fashion).
>
> I've never used Invokers, but you can also do this with a Provider
> class that reads in the raw XML and then acts appropriately based on
> the content.
>
> http://cwiki.apache.org/CXF20DOC/provider-services.html
>
> I use this to have a single class which hands requests for a whole
> bunch of different operations off to different handler classes.
>
> The implementor attribute for several different jaxws:endpoints can
> refer to the same Provider.
>
> So that's one way of doing it, if you don't mind rewriting the CXF
> config to add/remove endpoints.
>
> Andrew.
>
> --
> New site launched: http://biotext.org.uk/
>
> I am retiring my old email addresses.
> Please use [email protected] where firstname = andrew.
>