Spring Web Services, Finally!Aug 23, 2007 · 2 minute read · Comments
Spring Web Services seems to be the technology I have been looking for recently. I am not a Spring bigot (too XML oriented), but here the Spring folks have something right.
I used to work with Web Services the simple way: create a java class (or EJB), expose it as Web Service through Axis or RAD, generating the WSDL in the process. And then a client would just be the reverse, take the WSDL, use a tool (Axis or RAD) that creates client Java classes from it automatically. Simple, easy.
But this process starts to fail if you have
- several very similar WSDL: you want reuse instead of copy.
- other means of communicating XML represented by the XML schema embedded in the WSDL, for example via direct MQ use.
I found 2 techs that can help:
- SDOs (Service Data Objects): from my short experience, I find it a bit too verbose, and not yet fully mature, as you depend on libraries external to SDO ones for it to work in the case of web services. It can work, and if you use IBM products, it could be a good way to write Web Services Providers/Clients.
- Spring Web Services: I have not tried it yet, but it seems to solve exactly the kind of problems I described earlier. And you can plug-in any marshalling/unmarshalling framework you want :).