A web service is a network accessible interface to application functionality, built using standard Internet technologies.
The fundamental concept behind web services is the SOA (service-oriented architecture), where an application is no longer a large monolithic program, but is divided into smaller, loosely coupled programs, and provided services are loosely coupled together with standardized and well-defined interfaces. These loosely coupled programs make the architecture very extensible, as it acquires the ability to add or remove services with limited costs. Therefore, new services can be created by combining and reusing existing services.
Because of the abstraction provided by the standards-based interfaces, it does not matter whether the application services are written in Java and the browser written in C++, or the application services deployed on a UNIX box while the browser is deployed on Windows. Web services allow for cross-platform interoperability in a way that makes the platform irrelevant. Interoperability is one of the key benefits gained from implementing web services.
Figure 1. The web services invocation form j2me client
In the web services architecture, the service provider publishes a description of the service(s) it offers via the service registry. The service consumer searches the service registry to find a service that meets their needs. The service consumer could be a person or a program.In the web services architecture, the service provider publishes a description of the service(s) it offers via the service registry. The service consumer searches the service registry to find a service that meets their needs. The service consumer could be a person or a program.
The service provider offers business processes in the form of services. The services offered by the provider are called by the consumer to achieve certain sets of business goals. The process of services being provided and consumed is achieved by using directory services that lie between the provider and the consumer, in the form of broker. The service to be made available to the consumer is published to the directory services in the broker. The consumer wanting to achieve the set of business goal(s) will discover the service from the broker. If the service is found, it will bind to the service and execute the processing logic.
The Java 2 Micro Edition (J2ME) is a Java platform that is designed for small devices. It contains specially designed, lightweight virtual machines; a bare minimum of core-class libraries; and lightweight substitutes for standard Java libraries. J2ME is the ideal mobile client platform for wireless PDAs and enhanced mobile phones. It supports the standard Java programming language and contains a subset of APIs from the Java 2 Platform, Standard Edition (J2SE) with the addition of device-specific APIs. The Mobile Information Device Profile (MIDP) is a flavor of J2ME that runs on mobile phones.
All major mobile device vendors, including Nokia, Motorola, Siemens, Samsung, Fujitsu, Inventec, LG Electronics, Mitsubishi, NEC, Panasonic, Psion, RIM, Sharp, and Sony, have adopted Java as part of their core strategy for future smart devices. Major wireless carriers such as SprintPCS, and AT&T have committed to support Java devices and applications on their networks. In this tutorial, you focus on MIDP application development. For more information about J2ME and MIDP, see the J2ME 101 series of tutorials published by developerWorks (see Resources).
The J2ME Wireless Toolkit is a comprehensive set of tools for building MIDP applications. The toolkit can be used standalone, or incorporated into many popular integrated development environments (IDEs). Version 5 of Sun One Studio, Mobile Edition comes with the J2ME Wireless Toolkit 3.0 bundled in. It provides the byte code pre-verification tool, implementation of API class libraries, and a device emulator. The emulator does not correspond to any real physical device. Instead, it supports cutting-edge MIDP optional package APIs that are not yet implemented on physical devices.
- Integration with 3rd party emulators and Windows Mobile devices.
- On-device deployment and on-device debugging.
- CLDC/MIDP, CDC/FP/PBP/AGUI and BD-J integrated into one SDK.
- New CLDC Hot-Spot Virtual Machine.
- Optimized MSA 1.1 Stack with Extensions.
- Profiling support.
- BD-J support (for Windows Only).
- JavaFX Mobile Emulator.