Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Introduction to the WSDL Editor
|
WSDL - Web Services Description Language - is an XML based language for describing Web services
and how to access them (binding protocol, message format, etc.). It enables one to separate the description
of the abstract functionality offered by a service from concrete details of its description such as "how" or
"where" that functionality is offered. The WSDL editor is a powerful tool makes it possible to create and edit
WSDL files graphically, automating most of the tasks involved with these processes. |
Example: creating a WSDL file |
We’ll be prompted to type the name of the file to be created. In our example we’ll name the file “InternationalTime.wsdl”. After that click on the Next button to go to the next page. Accept the defaults on the WSDL Options page. It should look like the following: |
Click on the Finish button to close the dialog box. A WSDL skeleton will automatically be created, which gives us an excellent starting point for describing our Web service. The skeleton should look as follows: |
Let’s set the name of the Web service operation to “getInternationalTime”. To do this, it suffices to double click on the operation title and type the new name as shown below. |
Next we’ll specify the input and output formats of this service. To do so, we first click on the arrow that appears right next to the input operation: |
This will open an Inline Schema editor: a new tab will appear on top of the editor indicating so: |
In the Inline Schema Editor, we’ll set the type of the get InternationalTimeRequest element. In this particular case, given that the input parameter is a location composed by the name of a city and the name of a country, we’ll create a new complex type by right-clicking the InternationalTimeRequest element and selecting Set Type - New. In the New Type dialog box we select Complex Type and set its name to "Location". Next we add the elements "Country" and "City" of type String and set the kind attribute to "All". Once finished, the Location element should look as follows. |
We now return to the WSDL editor main screen by clicking on its corresponding tab: |
Next we set the format of the output in the same way we did for the input. We start
by clicking on the arrow that appears right next to the output as follows. The Inline Schema editor will open.
In it, we set the type of the getInternationalTimeResponse element by right-clicking it and selecting Set Type - Browse.
Since our web service will return the time of a given location, we choose from the type list
time and click on OK and save the changes made to the WSDL file. At this point we wont be needing the Inline Schema Editor any more, so we close it. |
Finally we have to make sure the WSDL file is valid. To do this, we right-click the file and select Validate. |
In case there are any problems with the contents of the file, these will appear on the Problems window.
If the Problems window is not visible in your workbench, you can show it by selecting from the main menu:
Window - Show - View - Problems More ExamplesThe previous example is intended to show just some of the basic operations that the editor offers. To view some of the more advanced options of the editor, we recommend exploring the sample WSDL files provided in the XML Example set. To access it, open the file menu and selection new – Examples. In the Wizard that appears, open the XML folder and select Editing and validating XML files. Then click on Next. |
A new project with a set of files will be created. The sample WSDL file is located in the PhoneBanking and SpaceWarGame folders. |
|