Chapter 8 Working with Web Services


Web services basics

A Web service is a service offered via the web. The principle on which a Web service works is the following: a business application sends a request to a service at a given URL address. The request can use the SOAP protocol over HTTP. The service receives the request, processes it, and returns a response. An example that is most commonly used for a Web service is a stock quote service in which the request asks for the price of a specific stock and the response gives the stock price.

In an OOM, you design a Web service as a component (EJB, servlet, or standard component) that includes a Web service implementation class.

When you work with Web services in an OOM, you use the class, component and deployment diagrams. They allow you to do the following:

What do you need to work with Web services?

You need a Java, C# or Visual Basic .NET compiler.

You also need a WSDL-to-Java and a Java-to-WSDL tool to generate Java proxy code and JAX-RPC compliant server side code. The WSDL-to-Java and Java-to-WSDL tools are used by the extended model definition named 'WSDL for Java'. For example, the WSDP (Web Service Developer Pack) provides a XRPCC tool, Apache AXIS provides a wsdl2java and a java2wsdl tool.

The WSDP can be downloaded from: http://java.sun.com/webservices/webservicespack.html.

The WSDP must be installed on the client machine in addition to J2SE SDK 1.4 and J2EE SDK 1.3. These are available at the following web sites: http://java.sun.com/j2ee/ and http://java.sun.com/j2se/

Apache AXIS can be downloaded from: http://ws.apache.org/axis/

To generate client proxy code for .NET, you will need to use the WSDL.exe included in Visual Studio .NET. It is a tool equivalent to WSDL-to-Java (used for proxy generation). You must declare the path to the WSDL.exe in the General Options dialog box (Tools→General Options) when you create the WSDL environment variables.

Audience

This chapter is primarily directed to anyone who is already familiar with Web services as it does not explain the required concepts and technologies in an exhaustive manner. It is intended to guide you through the use of PowerDesigner to help you create Web services and work with other Web services features.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.