Developer Guide to the WSDL Editor
Working with WSDL Files
Creating a WSDL File From Scratch
When you create a WSDL file from scratch, the wizard contains three pages that you can fill out.
- The Name and Location page prompts you to enter basic information about the WSDL file.
- The Abstract Configuration page prompts you to define the port type, operation, and messages.
- The Concrete Configuration page prompts you to define the binding, service, and port.
You do not need to complete all three pages. You can fill out the Name and Location page and then click Finish. Or you can fill out the Name and Location page and the Abstract Configuration page and then click Finish.
To create a WSDL file from scratch
- In the Projects window, right-click the Process Files node and choose New → WSDL Document.
- In the Name and Location wizard page, do the following:
- Enter a name for the file. The name must comply with the rules for the NCName data type. You cannot enter a name that already exists in the project.
- (Optional) Change the default folder by clicking Browse and selecting the new folder.
- Enter the target namespace for the WSDL file. The target namespace will appear in the root element.
- If you want to configure the abstract and concrete information from the wizard, then click Next. Otherwise, click Finish.
- In the Abstract Configuration wizard page, do the following:
- Enter a name for the port type.
- Enter a name for the operation.
- Select the category of operation.
- Define the message that the operation receives as input.
- If the operation is a request-response operation, then define the message that the operation sends as output.
- (Optional) If the operation is a request-response operation, then you can optionally define a message that the operation sends as a fault.
- If you want to configure the concrete information from the wizard, then click Next. Otherwise, click Finish.
- In the Concrete Configuration wizard page, do the following:
- Enter a name for the binding.
- Select the type of binding.
- Select the binding subtype. The choices vary depending on the binding type.
- Enter a name for the service.
- Enter a name for the port.
- Click Finish.
The WSDL file is created. The WSDL Editor appears in WSDL view.More InformationFor SOAP Bindings
If you created a SOAP binding, then the port's soap:address node includes a Location property. The Location property specifies the address of the port. The wizard generates a dummy value for the Location property. The Location property must be unique; that is, the value must not conflict with any other WSDL files that are deployed to the same application server.
Creating a WSDL File Based On an Existing WSDL File
Instead of creating a WSDL file from scratch, you can create a WSDL file based on an existing WSDL file.
To create a WSDL file based on an existing WSDL file
- In the Projects window, right-click the Process Files node and choose New → Other.
- In the Choose File Type wizard page, do the following:
- In the Categories list, select the XML node.
- In the File Types list, select the External WSDL Document(s) node.
- Click Next.
- In the Specify Resource Location wizard page, do one of the following:
- To create a WSDL file based on a running service:
- Select the From URL button.
- Enter the URL of the service's WSDL file.
- Click Finish.
- To create a WSDL file by using an existing WSDL file on the local file system:
- Select the From Local File System button.
- Specify the folder where the WSDL file is located.
- Click Finish.
The WSDL file is created. The WSDL Editor appears in WSDL view.
NCNAME Data Type
XML Schema includes a data type called NCName.
Any name that has the NCName data type must comply with the following rules:
- The name must begin with a letter or an underscore (_).
- The valid characters for the remainder of the name are:
- Period (.)
- Hyphen (-)
- Underscore (_)
Using Refactoring to Rename or Delete WSDL Components
You can perform refactoring by using the following approaches:
- Rename. Enables you to rename all occurrences in the associated XSD, WSDL, and BPEL files.
- Safely Delete. Enables you to check for references to the component before you perform the delete.
- Undo. After performing a Rename or Safely Delete action, you can undo that action.
- Redo. After performing an undo of a Rename or Safely Delete action, you can redo that action. Menu that shows the refactoring options
You can also rename a component by changing the value of the Name property. The WSDL Editor renames all occurrences in the same file, but not in other files.
Validating WSDL Files
The WSDL Editor includes a validation tool. The validation tool reviews the WSDL file for problems with syntax and semantics.
To validate a WSDL file
- Display any of the views in the WSDL Editor.
- In the toolbar, click the Validate XML button.
The Output window displays any errors or warnings.