Showing posts with label web services. Show all posts
Showing posts with label web services. Show all posts

Thursday, 27 October 2011

WebSphere AS: RAD vs WSDL2Java for JAX-RPC client SOAP bindings

I've been doing a bit of work recently with JAX-RPC on WebSphere Application Server 6.1. This is hardly cutting edge software (WAS 8 is out; JAX-RPC has been superceded by JAX-WS) but platforms can have a long shelf-life in the enterprise.

This post describes how to migrate from client bindings developed using RAD to automated generation via Ant. JAX-RPC isn't restricted to consuming SOAP in WARs, but this post confines itself to that topic.

For convencience, the sample code reuses the MaintainAddress.wsdl from a previous post.

Saturday, 23 April 2011

Java: JAX-WS web services and clients

JAX-WS is built into Java 6. This makes it a low-dependency choice for writing SOAP-based web service code. This post covers the basics of JAX-WS development with a sample web service.

An understanding of the following is beneficial: Servlets; XML Schema Definition (XSD); Web Services Description Langauge (WSDL); XPath; JAXB.

Server code was tested on Glassfish 3; client code was tested on Java 6.

The code here describes a contract-first web service; it is possible to do this the other way round, starting with Java code and generating descriptors from it.