Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0, Mac OS

Get PDF Book Print View

Document Information

Getting Started


Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Network Monitoring

Lightweight UI Toolkit

Security and MIDlet Signing

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)

On-device Debugging

Command Line Reference

Launch the SDK

Run the Device Manager

Manage Device Addresses (device-address)

Emulator Command Line Options

Build a Project from the Command Line

Packaging a MIDLet Suite (JAR and JAD)

Command Line Security Features

Change the Default Protection Domain

Sign MIDlet Suites (jadtool)

Manage Certificates (MEKeyTool)

Generate Stubs (wscompile)

Virtual Machine Memory Profiler (Java Heap Memory Observe Tool)

Run the Java Heap Memory Observe Tool

Heap Snapshot Elements


JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSR 180: SIP Communications

JSR 184: Mobile 3D Graphics

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 226: Scalable 2D Vector Graphics

JSR 229: Payment API Support

JSR 238: Mobile Internationalization API (MIA)

JSR 256: Mobile Sensor API Support


Generate Stubs (wscompile)

Mobile clients can use the Stub Generator to access web services. The wscompile tool generates stubs, ties, serializers, and WSDL files used in Java API for XML (JAX) RPC clients and services. The tool reads a configuration file, that specifies either a WSDL file, a model file, or a compiled service endpoint interface. The syntax for the stub generator command is as follows:

wscompile [options] configuration-files

wscompile Options lists the wscompile options:

wscompile Options
-d output directory
Specifies where to place generated output files
Enables the given features
Same as -f:features
Generates debugging info
Same as -gen:client
Generates client artifacts (stubs, etc.)
Specifies a HTTP proxy server (port defaults to 8080)
Generates interfaces and value types only
-model file
Writes the internal model to the given file
Optimizes generated code
-s directory
Specifies where to place generated source files
Outputs messages about what the compiler is doing
Prints version information
Sets the CLDC version to 1.0 (default). Float and double become String.
Sets the CLDC version to 1.1 (float and double are OK)
Shows all CLDC 1.0 information and warning messages.

Note - Exactly one -gen option must be specified. The -f option requires a comma-separated list of features.

Command Supported Features (-f) for wscompile lists the features (delimited by commas) that can follow the -f option. The wscompile tool reads a WSDL file, compiled service endpoint interface (SEI), or model file as input. The Type of File column indicates which of these files can be used with a particular feature.

Command Supported Features (-f) for wscompile
Type of File
Turns on explicit service context mapping
Turns off data binding for literal encoding
Turns off encoding type information
WSDL, SEI, model
Turns off support for multiple references
WSDL, SEI, model
Turns off full validation of imported WSDL documents
Searches schema aggressively for subtypes
Turns on direct serialization of interface types
WSDL, SEI, model
Enables WSI-Basic Profile features (default)
Resolves xsd:IDREF
No unwrap.


wscompile -gen -d generated config.xml
wscompile -gen -f:nounwrap -O -cldc1.1 -d generated config.xml