Web Services Invocation Framework:
ComplexSOAP Sample

This sample aims to demonstrate the invocation of a SOAP service that uses custom type definitions. This is a little different from using service that exchange messages typed using primitive schema types, since we have to have native equivalents for the custom schema types and know how to serialize and deserialize these the representations between our native format and the SOAP format.

The particular service we have chosen to demonstrate how to WSIF for such invocations is called Zip2Geo. This is a publicly available service hosted by www.cdyne.com. The service offers a single port type with one operation, called GetLatLong. This operation takes as input a zip code, and returns as output information about the corresponding location, such as the name of the city, state, its latitude, longitude, etc. The return value is a complex schema type. The service URL, where you can find details on the service implementation, etc. is here.

The WSDL file in this sample directory is publicly available via the service URL and has been downloaded from there.

Here's how to invoke this service dynamically using WSIF's dynamic invocation interface (DII).

Here's how to invoke this service by first generating the stub interface and using this directly through WSIF's dynamic proxy, thus hiding all WSIF specifics from the client code. Note that the stub interface used is the the service interface as defined by the JAX-RPC specification.