Generating Java Object API Code with Sybase Unwired Platform

Use the Generate Code wizard to generate object API code for the SUP101 mobile application project. Code generation creates the business logic, attributes, and operations for the mobile business objects (MBOs) in the project.
Prerequisites
  • In Enterprise Explorer, you must be connected to both My Sample Database and My Unwired Server. Code generation fails if the server-side (runtime) enterprise information system (EIS) datasources referenced by the MBOs in the project are not running and available to connect to when you generate object API code.
  • In WorkSpace Navigator, verify the Java Compiler level is set correctly:
    1. Select Window > Preferences > Java > Compiler.
    2. In the Compiler compliance level list, select 1.6 if it does not already appear.
    3. Click Apply, then OK.
Task
  1. In Sybase Unwired WorkSpace, open the SUP101 mobile application project.
    In WorkSpace Navigator, right-click the SUP101 folder and select Open in Diagram Editor.
  2. In WorkSpace Navigator, expand SUP101. Under Generated Code, add a folder named Android.
    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.
    Ignore any warning about unresolved mobile business object dependencies.
  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 Enter com.mycorp.sup101.android.mbo.
    Project path Enter \SUP101\Generated Code\Android.
    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.

    Android Tutorial Generate Code Window

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

Comments

Popular posts from this blog

How to draw an overlay on a SurfaceView used by Camera on Android?

Create EditText with dropdown in android

Android TCP Connection Chat application