Skip Headers
Oracle® Application Server Wireless Developer's Guide
10g Release 2 (10.1.2)
B13819-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

3 JDeveloper Wireless Extension

Each section of this document presents a different topic. These sections include:

3.1 Overview of JDeveloper Wireless Extension

JDeveloper Wireless Extension (JWE), which is built on the Oracle Extension Framework, integrates OracleAS Wireless functionality with Oracle JDeveloper, enabling you to create wireless applications using JDeveloper. This chapter includes an overview of JWE, and some examples of JWE's functionality. For all of the documentation, tutorials, and downloads, see http://www.oracle.com/technology/tech/wireless/tools/index.html.

The JWE enables you to develop, debug, deploy, and run Multi-Channel applications which can be accessed through different delivery methods, such as WAP, messaging or voice, and both regular J2ME (Java 2 Micro Edition) MIDlet applications as well as those which communicate with Web services through method calls.

You can test applications using emulators or real devices, debug MIDlets using breakpoints, and protect MIDlets using obfuscation. The JWE also enables you to use the development toolkits and emulators from a variety of manufacturers.

The installation of JWE in JDeveloper results in a new category node in the Category pane of JDeveloper's gallery called Wireless Applications. Selecting this node invokes the JWE options, described in Table 3-1.

Table 3-1 JWE Options

Option Description

J2ME Default MIDlet

Create a MIDlet

J2ME MIDlet Deployment

Create the deployment profile needed for the MIDlet to run

J2ME Proxy Connection

Create a connection the J2ME Proxy server. From this connection, register Web services with the WSDL (Web Service Definition Language) document URL, and generate J2ME stub classes.

Multi-Channel Application Creation Wizard

Build mobile browser applications using the Multi-Channel Creation Wizard

Multi-Channel Messenger Creation Wizard

Add mobile messaging to a Java application


3.2 Developing Multi-Channel Applications

The JWE enables you to mobile-enable an application from the JDeveloper IDE using the Multi-Channel application wizard. This wizard enables you to generate templates for the selected application. To this end, the wizard provides you with two options, Basic Features and Messaging Support through Pushlite API. Specific templates are associated with each of these options. For example, selecting Basic Features enables you to select from among the following templates:

After you select the appropriate template (or templates) for the application and complete the wizard, JDeveloper generates the templates. You then use JDeveloper's Component Palette to insert tags into the application and then test the application using the device emulators.

3.3 Adding Messaging to Java Applications

The JWE enables you to add OracleAS Wireless Messaging to any Java application in the JDeveloper IDE with the Multi-Channel Messenger Creation Wizard. This wizard generates a file called MultiChannelMessenger.java to the selected Java project file along with the required OracleAS Wireless SDK libraries. The MultiChannelMessenger.java file includes examples for using this utility class. In the Java application, you add an import statement for the MultiChannelMessenger utility. You then call the APIs of MultiChannelMessenger in the Java application by specifying the sender, recipient, and send information.

3.4 Creating J2ME Applications

The JWE enables you to create a regular MIDlet and also a MIDlet that calls a Web service.

Creating a MIDlet is a two-step process: creating the default MIDlet and then packaging it into the a MIDlet Suite for deployment.

3.4.1 Creating a Default MIDlet

To create the default MIDlet, the JWE provides a three-page wizard in which you select the package name and class name for the MIDlet. You can optionally add a specific library to the project where the MIDlet is created, or chain the default MIDlet to the Deployment Wizard immediately after the MIDlet's classes have been generated. You can further extend the MIDlet by adding application-specific code.

3.4.2 Deploying the MIDlet Application

The Deployment Wizard enables you to create a MIDlet suite in which you specify the packaging and deployment profile information needed to run the MIDlet. To create the MIDlet suite, you select the Java classes, images (.png files), or other resources included in the selected project. You then select from among the classes from the project that extends the javax.microedition.midlet.MIDlet class and serves as the entry point to the MIDlet. You then enter the MIDlet name to the selected class and then opt to publish the MIDlet to the MIDlet suite. You can also associate an icon with the MIDlet. In addition, you name the MIDlet suite, set the network proxy (if needed), manage the MIDlet's manifest entries, and select the library (or libraries) to deploy with the MIDlet. You can deploy the MIDlet immediately upon completion of the MIDlet suite. Once the MIDlet has deployed, you can run and test it on an emulator.

3.4.3 Creating a MIDlet That Calls a Web Service

The JWE enables you to create a MIDlet that calls a Web service. A MIDlet calls a Web service using the OracleAS Wireless J2ME Proxy Server, which optimizes communication between the MIDlet and the Web service.

JWE enables you to register a Web service with the J2ME Proxy Server through a WSDL (Web Services Definition Language) document and generate a J2ME stub class for the service.The MIDlet calls the methods of the stub class; each of these methods in turn represents an operation of the Web service. Using JWE, you can quickly create a MIDlet to test the method calls to the Web service. You can then create a MIDlet suite to deploy and run the MIDlet.