Updating Java ME Web Services Client Files
See Also
You can use the Java ME Web Services Client
wizard or the Mobile Client to Web Application Generator
to create a MIDP client/server connection.
After you have created the client and connection files, you can not manually
edit them. You can, however, regenerate them with different settings using the
Settings file, which is displayed in the Editor after you generate the the original
application, or when you open the Settings file in the Editor window.
To open the Settings file:
In the Files or Projects window, expand the project and double-click on the
appropriate node (.wsclient file
).
The Web Services Settings File opens in the Editor window.
To make changes in the generated files:
You can change the selection of services the application uses, and edit any
of the following fields:
- Client Information. This information cannot be edited.
- Client Options:
- Generate stubs. Generates stub methods on the client for
each exported service. Method names are incorporated in the class name. Using HelloService for
example, the sayHello() method is exported. The generated stub method
creates a method on the client called example_HelloService_sayHello(). If
this option is not selected, only one method is generated on the client.
When the option is selected, the server is called only after several
grouped calls are made and the getGroupedResults() method on the
client class is called. All the method calls are invoked in a single HTTP
request and response. Methods are invoked in the order they were called.
Results are returned in an enumeration object.
If a server call causes an exception, the exception is thrown when getGroupedResults() is
called. When an exception is thrown in a sequence of grouped calls, the calls
following the exception are not processed.
- Allow floating point. Activates support for float and
double data types.
- If you need to convert CLDC 1.1 types
to CLDC 1.0 types, you will need to convert Float and Double types to
String variables. To make the conversion, check the Allow floating point checkbox in the Settings panel. (This field might not be available
in all instances.)
To regenerate the application:
- Click the Generate Stubs button to regenerate the stub classes.
- If you have deleted or updated the local WSDL file, you also need to refresh
the WSDL file.
To refresh the WSDL file:
- Click the Refresh WSDL button.
If you have changed the WSDL file, you will be asked to if you want to change
your local WSDL file and update the stub files.
- If you are using a proxy server, you must set the proxy by choosing Tools>Options
in the Main Menu.
- If you are regenerating a three-tier application (an application generated
by the Mobile Client to Web Application Generator), you will need to build
and re-deploy the application.
- See Also
- Connecting MIDP Applications to Web Services
- Creating a Java ME Web Services (JSR-172) Client
- Creating a Three-Tier Mobile Web Services Client
-
Legal Notices