Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Hosting SOAP web services within embedded Jetty

Hi.

I'm trying to piece together how to host SOAP JAX-WS endpoints within
embedded Jetty without using heavier servlet impls such as Axis or
GlassFish Metro.

I see this post from late last year, but it does not fully explain how
to host JAX-WS endpoints

http://dev.eclipse.org/mhonarc/lists/jetty-users/msg03706.html

wherein I believe the author implies he's successfully using these
lines of code (he was having trouble with filtering inbound SOAP, but
presumably not with the lines of code below):

        Server server = new Server(8080);
        ServletContextHandler context = new
ServletContextHandler(ServletContextHandler.SESSIONS);
        context.setContextPath("/");
        server.setHandler(context);
        context.addServlet(new ServletHolder(new HelloServlet()),"/*");
...
        Endpoint utl_endpoint = Endpoint.create(new MyWebService());
        utl_endpoint.publish("
http://localhost:8080/no/MyWebServiceSoapHttpPort";;, new
MyWebService());

But I don't see how this can actually work.  I don't understand how in
this configuration

a) a JAX-WS endpoint runs on the same port as Jetty, and
b) if you changed the SOAP port, how would requests for the SOAP
service get routed to the utl_endpoint?

In short, would someone be so kind as to outline whether it's possible
to host a SOAP endpoint in a ServletContextHandler, and if so, how to
do this?

Thanks.

-- 
Mark


Back to the top