This is a feature of the Borland Web Services Kit for Java.
The Import WSDL wizard generates Java classes which contain the methods required to implement or interface with the web service defined in the WSDL. It can generate both the server side and client side classes, or the client side only. It can optionally generate a JUnit test case to test interaction with the generated web service. You add code to the generated classes to implement the methods as desired. The Import WSDL wizard also generates a deploy.wsdd
file which provides deployment information to the SOAP server.
The Import WSDL wizard generates some or all of the following files:
Files generated by the Import WSDL wizard
File name | Description |
---|---|
<type name>.java |
A class for each complexType in the WSDL. |
<service name>Service.java |
A service interface which defines a get method for each port listed in the service element of the WSDL. This service interface defines a factory class to get a stub instance. |
<service name>ServiceLocator.java |
A locator class which is the implementation of the service interface. |
<service name>TestCase.java |
An optional JUnit test case for testing the web service. |
<WSDL file name>PortType.java |
An interface for each portType in the WSDL. You will use the implementation of this interface to call the remote methods. |
<WSDL file name>SoapBindingImpl.java |
An implementation class for the portType interface. |
<WSDL file name>SoapBindingSkeleton.java |
An optional skeleton class to encapsulate an implementation for the server. |
<WSDL file name>SoapBindingStub.java |
A stub class which acts as a proxy for a remote web service. This allows you to call the web service as if it were a local object. |
deploy.wsdd |
An XML file that provides deployment information to the SOAP server. |
The wizard generates a package name based on the WSDL's target namespace or uses one that you specify, as well as adding any necessary project libraries.
To open the Import WSDL wizard, choose File|New, click the Web Services tab in the object gallery, and double-click the Import WSDL icon. The Import WSDL wizard is also available from the Web Services Explorer.
Enter a package name or select an available package from the drop-down list. You can also browse to a package by clicking the ellipsis button.
Choose the WSDL to import and use for generating the Java source files. Enter a URL or browse to it by selecting the ellipsis button the the right of the text field.
Deploy scope defines how instances of the service are created.
If Session is selected, there is one instance per authenticated session. Session is the default setting.
If Request is selected, there is one instance per request.
If Application is selected, one instance is shared among all requests.
Choose between SOAP 1.2 and SOAP 1.1 style type mappings. For instance, primitive schema types such as int
and boolean
are treated as
java primitives (int
, boolean
) in SOAP 1.1. The same primitive schema types are treated as Integer
and Boolean
classes in SOAP 1.2. Note that JAX-RPC is only available in SOAP 1.2.
Generates classes for elements in the WSDL even if they are not referenced by the currently specified set of bindings in the WSDL.
Indicates whether or not to generate the optional skeleton classes for server side implementation (<WSDL file name>SoapBindingImpl.java
and <WSDL file name>SoapBindingSkeleton.java
) and the deploy.wsdd
file.
Automatically generates a JUnit test case for the generated Java classes.
When this is selected, the import statements in the WSDL and the schema associated with the WSDL are ignored.
In this step, you can customize the namespace mapping that is used for packages. This step contains a grid that maps namespaces to package names.