Skip to main content

JAX-WS Spring support 1.4

Posted by kohsuke on April 22, 2007 at 3:11 PM PDT

As we close in on JavaOne, I've been making more progress on the Spring support.

In general, preparing slides is always a useful exercise for me to improve software — first, I really put myself into the users' shoes, which reveals kinks in the details. Second, the amount of text and code I can put in a slide is fairly limited, it forces me to think "why do we really need this extra method call here" or "shouldn't we be able to get rid of that line there?"

The main improvement in 1.4 is the simplification of the bean definitions. It used to take an extra element, but I realized while writing slides that it's really not necessary at all. See the following "before" and "after":

Before
<br /><wss:bindings id="jax-ws"><br />  <wss:bindings><br />    <wss:binding url="/soap"><br />      <wss:service><br />        <ws:service bean="#myService" /><br />      </wss:service><br />    </wss:binding><br />    <wss:binding url="/json"><br />      <wss:service><br />        <ws:service bean="#myService" bindingID="https://jax-ws-commons.dev.java.net/json/" /><br />      </wss:service><br />    </wss:binding><br />  </wss:bindings><br /></wss:bindings>
After
<br /><wss:binding url="/soap"><br />  <wss:service><br />    <ws:service bean="#myService" /><br />  </wss:service><br /></wss:binding><br />  <br /><wss:binding url="/json"><br />  <wss:service><br />    <ws:service bean="#myService" bindingID="https://jax-ws-commons.dev.java.net/json/" /><br />  </wss:service><br /></wss:binding>

Spring configuration file is still verbose (and I believe this is inherent limitation in Apache XBean), but every step counts.

For more information, downloads, and etc, see the project website.

Related Topics >>