javaspringjax-wsservlet-filtersjespa

Can I use a SimpleJaxWsServiceExporter with a javax.servlet.Filter?


I would like to set up a webservice endpoint using Spring's SimpleJaxWsServiceExporter for ease of use, but I also need to protect the webservice using a subclass of Jespa's HttpSecurityFilter

I suspect this does not work out of the box as SimpleJaxWsServiceExporter is using a separate HTTP server to the host webapp containing the filter - how should I accomplish this?

I have a class annotated with @WebService and in my applicationContext.xml

<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter"
        p:baseAddress="http://localhost:9581/"/>

Solution

  • I found a couple of alternative ways to host the endpoint within the same HTTP server (behind the filter)

    Either using JAX-WS WSSpringServlet and registering my @WebService beans via the wss:binding xml tag under the http://jax-ws.dev.java.net/spring/servlet namespace, or my preferred option, as JAX-WS Spring integration has Maven dependencies on Spring 2, using CXF.