Web service definition language (WSDL) is the XML file that stores the metadata used to describe your Web service, defines service endpoints, and publishes information about your Web service. WSDL helps automate the generation of client proxies for Web services in a language-and platform-independent way. Like the IDL file for CORBA, a WSDL file provides the framework for client and server communication.
From a project or Package Explorer, highlight the package that contains the Java file for which you are generating WSDL.
Right click the file and select Generate WSDL.
The Generate WSDL wizard displays. Table 4-7 describes the Generate WSDL properties. Complete the information and click next to move to the next window and Finish when done.
Window |
Property |
Description |
---|---|---|
General options |
Web Service Name |
The Web service for which you are generating WSDL. |
Location URL |
The location where the Web service is available. |
|
Target Namespace |
A valid Uniform Resource Identifier (URI) for the location where the WSDL document is published. The target namespace should not include the file name; WST appends the appropriate file name when the WSDL document is generated. The target namespace can be a Uniform Resource Name (URN), which is a globally unique and persistent URI.
|
|
Port Type Name |
Describes a collection of operation elements that define the abstract interface of the Web service. The port type name provides a unique name among all port types defined within the WSDL document. For example: <portType name="SimplePortType"> |
|
Binding Name |
Contains the details of how the elements of the Port type name are converted to a concrete representation of the Web service by combining data formats and protocols: <binding name="TestBinding" |
|
Service Port Name |
Indicates the Web service endpoint address. For example:
|
|
Implementation Class |
The name of the class file implementing the Web service. |
|
Type Mapping Version |
The type mapping version. Valid options are 1.1 (the default) and 1.2. |
|
Soap Action |
The URI for the SOAPAction HTTP header for the HTTP binding of SOAP. The SOAPAction HTTP request header field can be used to indicate the intent of the SOAP HTTP request. The URI identifies the intent. |
|
Binding Style |
The SOAP binding style:
|
|
Soap uUse |
The SOAP body use:
|
|
Method Selection |
Method nName |
Select the methods/operations of the Web service for which the WSDL is to be generated. |
Location |
File Location |
The location and file name (ending with .wsdl) of the generated WSDL file. |
Summary |
Summarizes your selections. Review and click Finish to generate the WSDL, or click Back to change any of your selections. |