® Expeditor Toolkit can be used to create Web Services client code that calls Web Services providers via a static or dynamic stub. The Lotus
Expeditor Toolkit supports the creation of Web Services clients using the WSDL of the Web Services provider. If the Web Services client will target a Lotus
Expeditor Client Web Services provider, it is best to create and deploy the Web Services provider first, prior to creating the Web Services client so that its WSDL is available.
Following are the steps to create a Web services client from scratch:
- Create a new bundle project named MyWebServicesClient:
Only "Client Services Projects" are supported with Mobile Web Services wizards. For example, a "Client Services Web Project" may not be used.
- Select File > New > Project.
- Select Client Services > Client Services Project.
- Select Next.
- Type a name for the new project (for example, MyWebServicesClient).
- Select Next.
- Select Next.
- Select Finish.
- Create a new client interface and optional stub:
- Select File > New > Other.
- Select Client Services > Mobile Web Services > Mobile Web Services clients.
- Select Browse to select the source folder or project for your client application.
- Optionally, enter the package you wish to use for the static stubs or leave it blank to use a default package instead. Please note that this option will not be enabled if you select the Create Dynamic Stub check box, as the Web Services runtime component requires that the package name match the WSDL namespace.
The Lotus Expeditor Client for Devices does not support exposing OSGi services as Web Services providers. Lotus Expeditor Client for Devices only supports JSR-172. without dynamic Web Services clients.
Note: If you intend to deploy a Web service client and a Web service provider in the same runtime, place the Web service client stub in a package that is different from the package of the Web service provider to prevent a runtime conflict.
- Enter the URL of the WSDL exposed by the Web Services provider (if known) or use the Browse button to load the WSDL from any project in the current workspace.
Please note that if the URL is secured with SSL (e.g. HTTPS), you will need to start the Rational
® Software Delivery Platform with the appropriate VM arguments to provide a valid client certificate. For example, the following VM arguments can be used:
Optionally, select the Create Dynamic Stub
check box to use dynamic stubs rather than create static stubs.
A dynamic stub allows the Web Services client to create and use custom marshallers for WSDL types that are non-bean classes or are incompatible with JSR-172.
- Optionally, select the Configure Security check box to configure Web Services Security for the client.
- Select Next.
- If there are any types in the WSDL that may require custom marshalling, you will be presented with the option of generating custom marshaller stubs for each type. This will only be true if the Create Dynamic Stub check box is checked.
For each type selected in the list, two classes will be generated; MarshalFactory
. These classes are implementations of the corresponding classes in the com.ibm.pvcws.osgi
plug-in. Please refer to the section Custom serialization (marshalling)
for information on how to complete the implementation of custom marshallers.
- If Configure Security was checked on the first page, select Next and refer to the section Securing Mobile Web Services for information on how to configure Web services security. Otherwise, select Finish.
Note: If you receive an exception with the message “Parsing of the specified WSDL failed”, followed by an explanation, ensure that the WSDL is accessible through a browser. This exception could either be the result of a firewall message in HTML-form requiring authentication, or could be due to an invalid WSDL. Please consult with your administrator.
Expeditor for Devices does not support dynamic stubs and Web Services security. As a result, any Web Services clients using dynamic stubs or Web Services security will not work on Lotus
Expeditor for Devices.
When the WSDL has two different bindings for the same PortType, developers should select No
when prompted whether or not to overwrite files.
Parent topic: Creating Mobile Web Services