Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK 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

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference

Launching the SDK

Running the Device Manager

Managing Device Addresses (device-address)

Running the Emulator From the Command Line

MIDlet Options

CDC Options

Debugging and Tracing Options

Building a Project from the Command Line

Checking Prerequisites

Compiling Class Files

Preverifying Class Files

Packaging a MIDLet Suite (JAR and JAD)

Command Line Security Features

Changing the Emulator's Default Protection Domain

Signing MIDlet Suites (jadtool.exe)

Managing Certificates (MEKeyTool)

Generating Stubs (wscompile)

Running the Payment Console From the Command Line

Virtual Machine Memory Profiler (Java Heap Memory Observe Tool)

Running the Java Heap Memory Observe Tool

Viewing the Heap Snapshot

Running WMA Tool

smsreceive

cbsreceive

mmsreceive

smssend

cbssend

mmssend

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

JSRs 184, 226, and 239: Graphics Capabilities

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Generating 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

Table 1 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.


Table 2 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