The Source for Java Technology Collaboration
User: Password:



Kohsuke Kawaguchi

Kohsuke Kawaguchi's Blog

JAX-WS Spring support 1.4

Posted by kohsuke on April 22, 2007 at 03:11 PM | Comments (0)

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 <wss:bindings> element, but I realized while writing slides that it's really not necessary at all. See the following "before" and "after":

Before

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

<wss:binding url="/soap">
  <wss:service>
    <ws:service bean="#myService" />
  </wss:service>
</wss:binding>
  
<wss:binding url="/json">
  <wss:service>
    <ws:service bean="#myService" bindingID="https://jax-ws-commons.dev.java.net/json/" />
  </wss:service>
</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.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds