WSDL Files: Web Service Descriptions

Files with the WSDL extension contain web service interfaces expressed in the Web Service Description Language (WSDL). WSDL is a standard XML document type controlled by the World Wide Web Consortium (W3C, see www.w3.org for more information).

WSDL files are used to communicate interface information between web service producers and consumers. An interface allows you to utilize a service’s capabilities without possessing the source code for the service.

# Contents of a WSDL File

WSDL files contain all of the information necessary for a client to invoke the methods of a web service:

- The data types used as method parameters or return values are defined.

- The individual methods are defined. WSDL refers to methods as operations.

- The protocols and message formats allowed for each method are specified.

- The URLs used to access the web service are specified.

# Imported WSDL Files

When you want to use another web service that was not built with WebLogic Workshop, you should first obtain the WSDL file for the service you want to use. For public web services, the WSDL file will typically be available on the web site of the organization that publishes the web service. For private web services, contact the organization that supports the web service to obtain the WSDL file.

WSDL files can also be found through both public and private UDDI registries. To learn more about UDDI, visit http://www.uddi.org.

Once you have the WSDL file, you may use WebLogic Workshop to create a Service control. The Service control may then be used from your web service like any other WebLogic Workshop control.

Note: Some web service tools produce WSDL files that do not contain an XML declaration. WebLogic Workshop requires that all XML files contain an XML declaration. The XML declaration is just the first line of an XML file of the following form:

    <?xml version="1.0" encoding="utf-8" ?>

If you receive a WSDL file that does not contain an XML declaration, you must add a declaration to the file using a text editor before you can use the WSDL file in WebLogic Workshop.

Note that the encoding attribute is not required. If an encoding attribute is not present, the default encoding is utf-8.

Note: as of WebLogic Platform 7.0 Service Pack 2, WebLogic Workshop will accept WSDL files that contain more then one service definition. However, a Service control will be generated only for the first service defined in the WSDL file and a warning message will be written to the generated CTRL file.

For more information on producing a CTRL file from a WSDL file, see Creating a Service Control from a WSDL File.

For more information on CTRL files, see CTRL Files: Implementing Controls.

If the web service you wish to use was built with WebLogic Workshop, you may use a Service control CTRL file directly from the JWS file.

To learn more about Service controls, see Service Control: Using Another Web Service.

# Generated WSDL Files

When you want to make your web service available to others, you do so by producing a WSDL file for your web service and making it available to your service's clients.

For more information on generating WSDL files, see How Do I: Publish a WSDL File for My Web Service?.

If your clients are web services built with WebLogic Workshop, they can use a Service control CTRL file generated directly from your web service's JWS file.

For more information on CTRL files, see CTRL Files: Implementing Controls.

To learn more about Service controls, see Service Control: Using Another Web Service.

Related Topics

WebLogic Workshop Projects

W3C WSDL Specification