In this tutorial we will look at using the WSDL Editor to create and modify a WSDL file. We will explore the basic and more advanced functionality of the WSDL editor.
The next option is the "Create WSDL Skeleton". If this option is selected, the wizard will create a simple WSDL skeleton from which we can quickly modify the WSDL as we see fit. We will discuss the contents of the generated skeleton below.
If the "Create WSDL Skeleton" is selected, we are presented with additional options to configure. The first is the protocol. From this dropdown menu we can select either the SOAP or HTTP protocol. Next are the Binding Options. The choices listed here will depend on the protocol selected. Only Binding Options which apply to the selected protocol will be displayed. The Protocol and Binding Options selected here will be used to generate the Binding for the WSDL Skeleton.
For our example, use the default Protocol and Binding options (SOAP Protocol and document literal Binding Option) and click on "Finish".
Below we see the generated WSDL skeleton (Graph View).
The graph view above displays the WSDL in an easy to read format. The view is divided into several groups with each containing instances of that particular element.
Selecting a WSDL element in the graph view also shows it's relationship to the other elements by connecting arrow lines. For example, if we select "NewOperationRequest" Part (Figure 2), arrow lines will be drawn from the Port --> Binding Input --> Port Type Input --> Part --> XML Schema Element.
Renaming a WSDL Element is done by right-clicking on the element and selecting "Rename". Alternatively, rename can be done through the properties view.
For our example, rename the Operation "NewOperation" to "EmployeeInfoById". Notice the multiple renamings which occur. The Operation is renamed along with it's associated Messages, Parts, and XML Schema Elements.
To create an Operation, select the Port Type "Employee". Right-click and select "Add Operation". The Add Operation dialog will appear.
The dialog contains the option "Create default messages". Selecting this option will create a new Operation along with the following associated elements:
We shall use the XML Schema View to modify the inline schema. In the "Types" group, double-click on the inline schema. The XML Schema View will appear showing four XML Schema Elements. Follow the steps below to edit the XML Schema:
The last step required is the re-generation of the Binding. The Binding was originally based on the Operation generated by the wizard. But since then we have modified and created a brand-new Operation. Right-click on the "EmployeeSOAP" Binding and select "Generate Binding Content...". Select the "Overwrite existing binding information" option and click-on "Finish".
The finished WSDL file is shown below.
Now that we've finished editing the WSDL, you can save the file.