Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] servlet filter and JAX-WS Endpoint when running Jetty Embedded

Thanks Jan.

The thing is that I try to establish a filter to do some preprocessing   stuff on the SOAP.
I am able to do this when I pack a war file and deploy to a jetty server.
During development I would like to run embedded jetty, but I am not able to get this filter mechanism to work when running embedded.
I have not found any example on how to do this, if possible.

Here is my sun-jaxws.xml

<endpoints version="2.0" xmlns="";>
 <endpoint implementation="test.HelloWebService" 

Here is part of my web.xml

    <description>JAX-WS  Hello</description>

-----Original Message-----
From: jetty-users-bounces@xxxxxxxxxxx [mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Jan Bartel
Sent: 27. august 2013 09:38
To: JETTY user mailing list
Subject: Re: [jetty-users] servlet filter and JAX-WS Endpoint when running Jetty Embedded


Can you provide more specific information on what is not working? If it helps, in general JAX endpoints are not servlet instances, and require some magic to make servlet containers work with them. Most JAX frameworks provide a special servlet that handles all inbound requests and routes to the specific endpoint.


On 27 August 2013 17:13, Per Jørgen Vigdal <Per.Jorgen.Vigdal@xxxxxxxx> wrote:
> Hi.
> I am not able to set up a filter to work with my JAX-WS Endpoint when running Jetty Embedded.
> Something like this do not work :
>         Server server = new Server(8080);
>         ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
>         context.setContextPath("/");
>         server.setHandler(context);
>         context.addServlet(new ServletHolder(new HelloServlet()),"/*");
>         FilterHolder f = new FilterHolder(SOAPServletFilter.class);
>         context.addFilter(f, "/*", null);
>        Endpoint utl_endpoint = Endpoint.create(new MyWebService());
>        utl_endpoint.publish(" http://localhost:8080/no/MyWebServiceSoapHttpPort";, new MyWebService());
>         server.start();
>         server.join();
> Please help me
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx

Jan Bartel <janb@xxxxxxxxxxx>
'Expert Jetty/CometD developer,production,operations advice'
jetty-users mailing list

Back to the top