Generating Java Object API Code

Use the Generate Code wizard to generate object API code for the SUP101 mobile application project. The code generation creates the business logic, attributes, and operations for the mobile business objects in the project.

Prerequisites
Task
  1. In Unwired WorkSpace, open the SUP101 mobile application project.
    In WorkSpace Navigator, right-click the SUP101 folder and select Open in Diagram Editor.
  2. (Optional) If you are performing other tutorials, add a new folder to the project to organize the generated code for each device platform.
    For example, in WorkSpace Navigator, expand SUP101 and under Generated Code add an Android folder.

    The Generated Code directory was created during the MBO tutorial.

  3. Right-click anywhere in the SUP101 - Mobile Application Diagram and select Generate Code.
  4. In the Generate Code wizard, click Next to continue without a configuration.
  5. In the Select Mobile Business Objects window, select the Customer MBO, then click Next.
  6. In the Configure options window, specify these values and click Finish.
    Option Description
    Language Select Java.
    Platform Select Android.
    Unwired server Select My Unwired Server.
    Server domain Select default.
    Page size Select 1024.
    Package (Optional) Enter a unique name for the Java package.
    Project path Leave the default \SUP101\Generated Code, or browse to another folder you created for the device platform in Step 2.
    Third-party jar file Click Browse to open an android.jar, by default located in C:\Program Files\Android\android-sdk\platforms\android-xx.
    Generate JavaDoc Unselect for this tutorial.



  7. In the Success dialog, click OK.
    In the Generated Code directory, you see a \src\SUP101 folder.