How Do I: Use a .NET Web Service?

You can use a .NET web service from a WebLogic Workshop web service by using a Service control. A Service control allows your web service to use another web service as though it were a regular Java class, regardless of the language in which the other web service is implemented.

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 .NET 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/service.asmx, you would enter the following URL:

          http://host/service.asmx?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.

This topic describes how a WebLogic Workshop web service may act as the client to a .NET web service. For an example of a .NET web service acting as a client to a WebLogic Workshop web service, see .NET Client Sample.

Related Topics

Service Control: Using Another Web Service

WSDL Files: Web Service Descriptions

CTRL Files: Implementing Controls