I have developed web services using the so called easy way, which is the code first approach. In this kind of technique, the xml schema and the wsdl are generated by the framework. The ones I’ve used were Metro web services and Apache CXF. Both of them uses JAX-WS annotations. It was so easy to use that you simply use annotations, deploy it to a web server, then … poom! There goes the xml schema and the wsdl generated on the fly. I didn’t care about it as long as it works! It too works very well with a client generated by wsimport from the command line.When I got a break, I checked out Spring web services which uses the conract first approach. Contract first web service approach is an industry standard best practice when developing web services.

Honestly speaking, spring web services was a lot harder to learn that JAX-WS based frameworks. It requires knowledge of SOAP, xml schema, xml frameworks, and marshallers. Despite the learning curve, the reward is so rewarding. Once you get used to programming spring web services, it will be as easy as coding a JAX-WS based framework. I’m gonna check out RESTful services soon.

After enjoying soap web service development with Spring, I decided to make my own article that will get up and running spring web services from contract to security.