How Do I: Use a WebLogic Server Web Service?

WebLogic Server provides a way to create web services outside of WebLogic Workshop, by using the servicegen facility. You can use such a web service from WebLogic Workshop in exactly the same way you use a web service built with any tool: via a Service control. A Service control can be created from the WSDL file for the target web service.

In order to create a Service control for a non-WebLogic Workshop web service, you must first obtain the target web service's WSDL (Web Service Description Language) file. The WSDL file can typically be obtained by accessing the web service's URL with ?WSDL appended.

To Build a Service Control for a WebLogic Server Web Service

1. In a web browser, access the web service from the browser using the normal URL with ?WSDL appended to the end.

For instance, if the service was at the URL http://host/TraderService, you would enter the following URL:

          http://host/TraderService?WSDL

2. Save the WSDL you receive to a WebLogic Workshop project. Note that some browsers will save the file with HTML tags at the top and bottom that must be removed in a text editor.

3. In WebLogic Workshop, browse to the project and directory to which you saved the WSDL file.

4. Right-click on the WSDL file and select Generate CTRL from WSDL.

5. The resulting CTRL file is a Service control that you may use from any web service in the project. To learn more about Service controls, see Service Control: Using Another Web Service.

To learn how to use the resulting Service control, see Using a Control.

Note: WSDL files generated by WebLogic Server 6.1 use an earlier version of XML Schema which may make them incompatible with WebLogic Workshop 7.0. To learn how to modify a WebLogic Server 6.1 WSDL file so that it may be used by WebLogic Workshop, see How Do I: Create a Service Control from a WSDL File Generated by WebLogic Server 6.1?.

Related Topics

Service Control: Using Another Web Service

How Do I: Generate a CTRL File?