Viewing and Editing Project Properties
Running Projects in the Emulator
Searching the WURFL Device Database
Finding Files in the Multiple User Environment
CLDC Emulation on a Windows Mobile Device
Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)
JSR 82: Bluetooth and OBEX Support
JSR 135: Mobile Media API Support
Generating Stub Files from WSDL Descriptors
JSR 177: Smart Card Security (SATSA)
JSR 205: Wireless Messaging API (WMA) Support
JSR 211: Content Handler API (CHAPI)
JSR 226: Scalable 2D Vector Graphics
JSR 238: Mobile Internationalization API (MIA)
JSR 256: Mobile Sensor API Support
This sample procedure creates a new project and adds a web service client. However, you can add a web service client to any MIDP project, it does not have to be new.
Click Running Web Service and in the WSDL URL field, enter:
In the Package field, enter testws. This is the package name.
Click Finish. The new package appears in Source Packages and includes Shakespeare.java and Shakespeare_Stub.java.
At the beginning, add the following import declaration:
import testws.*
Locate the startApp() method and replace its contents with the following code:
String text;
Shakespeare s = new Shakespeare_Stub();
try
{
text = s.GetSpeech("Romeo");
}catch(java.rmi.RemoteException rex)
{
text = "error";
System.out.println(rex.getMessage());
}
TextBox t = new TextBox("Hello", text, 2048, 0);
t.addCommand(exitCommand);
t.setCommandListener(this);
display.setCurrent(t);You can vary the above procedure to use a local WSDL file. Open the following web page in a browser:
http://www.xmlme.com/WSShakespeare.asmx?WSDL
Save it to a local file. For example, c:\ws\WSShakespeare.wsdl. Follow the procedure above, except at Step 4, specify the local file name.