Exit Print View

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

Get PDF Book Print View
 

Document Information

Getting Started

Features

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

Logs

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

Index


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
Option
Description
-d output directory
Specifies where to place generated output files
-f:features
Enables the given features
-features:features
Same as -f:features
-g
Generates debugging info
-gen
Same as -gen:client
-gen:client
Generates client artifacts (stubs, etc.)
-httpproxy:host:port
Specifies a HTTP proxy server (port defaults to 8080)
-import
Generates interfaces and value types only
-model file
Writes the internal model to the given file
-O
Optimizes generated code
-s directory
Specifies where to place generated source files
-verbose
Outputs messages about what the compiler is doing
-version
Prints version information
-cldc1.0
Sets the CLDC version to 1.0 (default). Float and double become String.
-cldc1.1
Sets the CLDC version to 1.1 (float and double are OK)
-cldc1.0info
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
Option
Description
Type of File
explicitcontext
Turns on explicit service context mapping
WSDL
nodatabinding
Turns off data binding for literal encoding
WSDL
noencodedtypes
Turns off encoding type information
WSDL, SEI, model
nomultirefs
Turns off support for multiple references
WSDL, SEI, model
novalidation
Turns off full validation of imported WSDL documents
WSDL
searchschema
Searches schema aggressively for subtypes
WSDL
serializeinterfaces
Turns on direct serialization of interface types
WSDL, SEI, model
wsi
Enables WSI-Basic Profile features (default)
WSDL
resolveidref
Resolves xsd:IDREF
WSDL
nounwrap
No unwrap.
WSDL

Examples

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