Making Web services accessible

WebLogic Workshop version 1.0 is closely tied to the WebLogic Server. It is included with the server, and is available in only one version. It does not compete with other full-featured development environments, like IBM WebSphere Application Studio, JBuilder, and IntelliJ, but includes a wealth of features.
Written by Tony Patton, Contributor
The hype surrounding Web services continues to swell, with all of the major players offering the necessary tools to use this new technology. BEA is no different with the release of BEA WebLogic Workshop. It streamlines the development of Web services with a drag-and-drop graphic interface.

WebLogic Workshop version 1.0 is closely tied to the WebLogic Server. It is included with the server, and is available in only one version. It does not compete with other full-featured development environments, like IBM WebSphere Application Studio, JBuilder, and IntelliJ, but I was pleasantly surprised by the wealth of features included in the initial release of this product.

One of the key selling points of WebLogic Workshop is its visual development environment. BEA states that WebLogic Workshop allows non-Java developers to easily build Java-based Web services. This feature doesn’t limit the capabilities of savvy Java developers, because full code access is still available.

Client layout
Figure A provides a glimpse of the WebLogic Workshop interface with a sample project setup. The left portion of the interface includes the Project Tree. This includes all project contents organized in folders.

Figure A

WebLogic Workshop client

The middle portion of the screen is the main work area. It shows the methods and services included in the application. The services are listed on the right with public methods or callbacks shown on the left.

The right panes of WebLogic Workshop are dynamic based upon the item selected in the middle pane: They include properties and item descriptions. Now, let’s take a closer look at the main area of the Workshop client (the middle pane).

Point-and-click development
The middle pane includes two tabs: Design View and Source View. The Design View tab lets you create a J2EE Web service by pointing and clicking. The Add Operation and Add Control drop-down lists are the driving force of the environment. Adding an operation involves adding a method or callback.

A callback is a method defined on the client, which can be called by your service. Callbacks make it possible to have an asynchronous two-way exchange between a client and a service. Once the methods are added, the code can be edited in the source tab. Figure B shows the source view of a test method added—notice the drop-down lists (highlighted) allowing different objects or methods to be edited.

Figure B

Editing code for a new method

Anatomy of a Web service
A J2EE Web service comprises various technologies. These may include database connections, EJBs (Enterprise JavaBeans), JMS (Java Message Service), SOAP (Simple Object Access Protocol), UDDI (Universal Data Directory Interchange), and WSDL (Web Service Description Language) as well as others. The presence of so many technologies can be cumbersome. This is the main reason BEA developed the Workshop product.

Connections to other systems and Web services are added to a Workshop service by way of the Add Control drop-down list in the Workshop client. You can add any of these items to the project, from a WebLogic Workshop Control file (CTRL) or a WSDL file.

The sample project presented in Figure A includes SOAP and JMS services. The services show the methods and events returned. JWS files

JWS files are an integral aspect of the WebLogic Workshop application. A JWS file contains syntactically correct Java. However, a JWS file also has attributes that allow it to take advantage of WebLogic Workshop's powerful facilities for Web services:

  • It contains Javadoc tags specific to WebLogic Workshop that indicate that helper objects should be automatically generated and associated with the class at both compile time and runtime. These Javadoc tags all begin with @jws.
  • It has the JWS extension, which, when it appears in a URL, indicates to WebLogic Server that the file should be handled as a Web service.
  • A JWS file contains only the logic you need to implement your Web service. WebLogic Server automatically handles all of the underlying infrastructure, protocols, and Web service, lifecycle management. JWS has been submitted for approval as a standard with the Java Community Process (JCP). Other tool vendors (including WebGain and TogetherSoft) have demonstrated JWS support, but WebLogic is the only vendor to currently include JWS support in its products.

    WebLogic Workshop includes the BEA WebLogic Server, which allows all aspects of your Web service to be fully tested. It also includes the ability to set breakpoints and fully debug your application. The Debug drop-down menu allows an application to be started. An interface is automatically generated for your application. Figure C includes the interface generated for our test application.

    Figure C

    Web interface generated by WebLogic Workshop
    The interface generated in Figure C includes five tabs that allow you to monitor what is happening with the service: The Test Form tab provides an interface to the methods (or callbacks) included. The message log (left pane) allows you to watch what is occurring behind the scenes with your Web service.

    Great for BEA WebLogic environments
    WebLogic Workshop is a nice product if you work with a WebLogic Server. It automates many of the countless tasks associated with creating a Java Web server, including WSDL, JWS, and SOAP generation, as well as JMS and database calls/integration. Hands-on Java developers may flinch at the point-and-click interface, but I enjoyed working with the project and look forward to the next iteration. WebLogic plans to support other server products in future versions.

    Editorial standards