Laszlo Merczel Laszlo Merczel -4 years ago 194
Java Question

Java-config counterpart of wss:binding?

Ok, so here's something I've been googling for for hours with no success... Finally i can only hope some Spring-magician reads and answers this question. :)

I'm upgrading an old web application (Spring 2.x-based) to Spring 4.2.x and while adding new features I've decided to completely move away from XML-based config. (Again: i don't want to have any Spring XML files in the project!)

I've converted pretty much everything, but the last thing i can't resolve is finding the correct Java-config counterpart of:

<ws:service id="MySoapService" bean="#ServiceImpl" />
<wss:binding service="#MySoapService" url="/1.0/soap" />


ws/wss namespaces come from:

xmlns:ws="http://jax-ws.dev.java.net/spring/core"
xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"


So what i'm trying to do is exporting
@WebService
annotated classes, but with Java-config instead of XML.

Additional infos:


  • I've tried using
    SimpleJaxWsServiceExporter
    , but that one leaves me with a "java.net.BindException: Address already in use: bind", regardless of what port i'm using...

  • The application has two servlets: one is a normal Spring MVC Dispatcher for the new REST API and another
    com.sun.xml.ws.transport.http.servlet.WSSpringServlet
    which should make the above mentioned JAX-WS service available.

  • I'm trying to resolve things with pure JAX-WS RI, no CXF or any other library. The application is huge enough already... :(


Answer Source

Apparently there's no solution (yet?) - after quite a few more hours of googling around, i've found only this ticket:

https://java.net/jira/browse/JAX_WS_COMMONS-134

Looking at its date and status (and by noting the fact that devs didn't even respond to it, even a year has passed), i assume it's safe to state that JAX-WS Commons spring integration will not support Java config in the foreseeable future.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download