In this section, we will show you how to generate a sample rich client crm application from scratch. This assumes that the web service for the application is already available and ITAnyplace plugin is installed in Eclipse. This sample ships with ITAnyplace.
Follow the following steps:

















Index node looks as shown below:


After save, Insert node looks as shown below:

Since this is Add operation, only Upload is enabled.
Attachment node looks as shown below:



View node looks as shown below:
![]()
Set Download to Yes and Upload to No.




Update node looks as shown below:
![]()

![]()


Delete node looks as shown below:
![]()


Purge node looks as shown below:
![]()



Sync node looks as shown below:

After Generating the model, its time to generate the code for the model.

Directory Structure is shown below:

Deployment of semi-connected applications
A couple of additional steps are required to deploy a J2ME CDC application:
ITAnyplace app container uses cards.properties to create screens (cards) for each node. It uses AWT cardlayout. If it finds any node with operation type ‘None’, that node is used as the index (first) card. If you have more than one ‘None’ nodes, then please edit cards.properties and mark the desired card as the index card





Setting up the test environment
While ITAnyplace client only requires a JVM, here is a list of utilities that you would find useful in developing and testing applications on PocketPC.
Microsoft provides a standalone PocketPC emulator. You can download and install it from the link given below. The emulator requires Virtual Machine Network Driver. Please install it from the link given below.
http://www.microsoft.com/downloads/details.aspx?familyid=C62D54A5-183A-4A1E-A7E2-CC500ED1F19A&displaylang=en#QuickInfoContainer
http://www.microsoft.com/downloads/details.aspx?familyid=DC8332D6-565F-4A57-BE8C-1D4718D3AF65&displaylang=en
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&DisplayLang=en
Running your applications in JVM
There are two ways to use the virtual machine, by invoking j9.exe or j9w.exe. The first one is equivalent to java.exe in traditional J2SE; the second is equivalent to javaw.exe in that environment. j9w.exe starts the application without generating command line output. In other words, it starts silently. For development purposes, j9.exe is better, since the exceptions will be displayed on the screen; while for final software releases j9w.exe is better.
In order to run applications in the pocket PC, you must always use full path file names in your applications. This includes the options and parameters of your java application. The pocket PC and the j9 virtual machine seem not to understand relative paths.
The path names, jvm option keys and the java application name must be writtenIn double quotes - " ". For, example, to run a Hello World application you can create a windows link file by creating a file with extension .lnk. Change its content to look like:
255#"\J9\PPRO10\bin\j9.exe" "-jcl:ppro10" "-cp" "\opt\SWT\" "HelloWorld"
or
255#"\J9\PPRO10\bin\j9.exe" "-jcl:ppro10" "-cp" "\My documents\example\hello.jar"
"com.Hello"
In this example, the HelloWorld.class file is located at \opt\SWT\ directory. The parameter "-jcl:ppro10" indicates to J9 which profile to use for its execution, in this case the personal profile. The current directory is provided as the classpath. This is necessary, since the HelloWorld.class file is located in the \opt\SWT directory. The additional packages, installed in the ext folder of J9 runtime are automatically part of the classpath and do not need to be passed to the -cp parameter. The "255#" part in the begining of the link file indicates the size of the command line in bytes. This seems not to work well in the Windows CE 2003, though: more than 255 characters are ignored.
Alternatively, you can create a .bat file, similar to the ones you use in regular windows desktop, and add the line above with the exception of the "255#" part. In order to execute .bat files, however, you need to run the cmd.exe application you previously installed in Microsoft Power Toys.
Here it is an example of a .bat file that runs a YANCEES publish client."\Program Files\J9\PPRO10\bin\j9.exe" "-jcl:ppro10" "-cp" "\opt\RMI\Yancees-
SNAPSHOT.jar;\opt\RMI\" -D"java.security.policy=file://opt/RMI/java.policy.all" -
D"java.rmi.server.codebase=file://opt/RMI/Yancees-SNAPSHOT.jar" "RMIPublisher"
"bahia.ics.uci.edu" "/opt/RMI/event.xml"
Test the client installation
On Windows Mobile, use the launcher (say wm.lnk) to launch the application. You should see the following application after running wm.lnk.
