BBj and Web Services

Background

In many ways, using Web services is similar to using HTML. When a user requests an HTML page from a remote Web server, the Web browser on the user's machine communicates with the remote Web server by transferring ASCII data. Often, a program that is running on the Web server has generated the HTML file that displays in the user's browser. The Web browser cannot tell the language used to write the program that generated the HTML. The language and the operating system of the remote program are transparent to the Web browser. Web services provide this same transparency when using Remote Procedure Calls (RPC).

A Remote Procedure Call (RPC) is any mechanism that allows a program running on one machine to invoke code that is actually running on some other machine. There are a number of implementations of RPC (CORBA, RMI, DCOM, traditional client/server implementations, etc.). However, none of these implementations provides the level of transparency seen when using HTML.

Web services is a set of standards (W3C) for doing RPC. When programs use these standards, the data transferred between the programs is all ASCII data in XML format. This allows a program (the consumer program) to invoke code (the provider program) running on another machine, even when that provider program uses a different language.

BBj Capabilities

BBj provides the ability to "consume" Web services and the ability to "offer" a Web service that executes BBj code.

Consuming a Web service is relatively straightforward, but does require a Java SDK and the Java JAX-PAC (both available without charge from www.java.sun.com).

Offering a Web service involves configuring a Web Server that is aware of Web services (e.g. Tomcat Web Server available without charge from www.java.sun.com). After correctly configuring the Web Server, writing the Web service is straightforward.

For information about consuming Web services, see Consuming Web Services.

For information about providing Web services, see Providing Web Services.