Using WSDL to Generate SOAP Binding

Ivan Marsic • Rutgers University 288 • In what order should related Web services and their operations be invoked? not supported by WSDL - How can services be composed to create a macro service often referred to as service orchestration? The diagram in Figure 8-17 lists the different aspects of Web service description. WSDL focuses on describing individual Web services, and interface and implementation descriptions are the central elements of describing individual services. Policy and presentation are two concepts that are not in the scope of the core WSDL specification since more standardization work needs to be done here. When considering service relationships, or service interactions, programmatic approaches composition vs. configuration-oriented agreements orchestration have to be distinguished. Orchestration is a synonym for choreography. An emerging specification is the Business Process Execution Language for Web Services BPEL4WS. Figure 8-17 lists also service and business level agreements, both not yet defined in detail. Some Web services are so simple that they do not need the complete description as shown in Figure 8-17. A service consumer invoking a standalone service is probably not interested in how the service is orchestrated with other services. Sometimes the consumer does not care about non- functional characteristics, such as performance or reliability. In addition, non-functional characteristics may be irrelevant if only one provider exists for a service.

8.4 UDDI for Service Discovery and Integration

The discovery agency level connection is a publishfind mechanism Figure 8-1, either used at build-time or runtime. Universal Description, Discovery, and Integration UDDI is an Business level agreements Service level agreements Composition Orchestration Presentation Policy Implementation description Interface description XML Schema Service Description Service Broker UDDI Registry Service Broker UDDI Registry Service Provider Service Provider Service Customer Service Customer 3. BindUse 2 . F in d S e a rc h 1 . P u b lis h R e g is te r Service Description Indi vidual ser v ic e de scr ip ti on Se rv ic e re lat ion ships Figure 8-17: Web service description stack. Chapter 8 • Web Services 289 implementation of the discovery agency. The UDDI registry offers a common repository to which service providers publish service information, and which service requestors inquire to find service information. UDDI defines a structure for the registry, together with a publishing and inquiry Application Programming Interface API for accessing the registry. If a service repository is used at runtime, we refer to this mode as dynamic Web services.

8.5 Developing Web Services with Axis

As the brief review above illustrates, the technology behind Web services is quite complex. Luckily, most Web services developers will not have to deal with this infrastructure directly. There are a number of Web services development toolkits to assist with developing and using Web services. There are currently many tools that automate the process of generating WSDL and mapping it to programming languages Figure 8-16. One of the most popular such tools is Axis. Apache Axis Apache EXtensible Interaction System, online at: http:ws.apache.orgaxis is essentially a SOAP engine—a framework for constructing SOAP processors such as clients, servers, gateways, etc. The current version of Axis is written in Java, but a C++ implementation of the client side of Axis is being developed. Axis includes a server that plugs into servlet engines such as Apache Tomcat, extensive support for WSDL, and tools that generate Java classes from WSDL. Axis provides automatic serializationdeserialization of Java Beans, including customizable mapping of fields to XML elementsattributes, as well as automatic two-way conversions between Java Collections and SOAP Arrays. Axis also provides automatic WSDL generation from deployed services using Java2WSDL tool for building WSDL from Java classes. The generated WSDL document is used by client developers who can use WSDL2Java tool for building Java proxies and skeletons from WSDL documents. Axis also supports session-oriented services, via HTTP cookies or transport-independent SOAP headers. The basic steps for using Apache Axis follow the process described in Section 8.3.4 above illustrated in Figure 8-16. The reader may also wish to compare it to the procedure for using Java RMI, described in Section 5.4.2 above. The goal is to establish the interconnections shown in Figure 8-2.

8.5.1 Server-side Development with Axis

At the server side or the Web service side, the steps are as follows: