Generating C# Object API Code

Generate Object API code for Windows Mobile devices.

Prerequisites
You must be connected to both the sampledb database and Unwired Server.
Task
  1. In WorkSpace Navigator, right-click the SUP101 project folder and select Generate Code to launch the Code Generation wizard.
  2. Select Continue without a configuration and click Next.
    Note: This page of the code generation wizard is seen only if you are using the Advanced developer profile.
  3. In Select Mobile Objects, select the customer and sales_order MBOs in the SUP101 mobile application project.
    Dependent MBOs are automatically added (or removed) from the Dependencies section depending on your selections.
    Note: Code generation fails if the server-side (run-time) enterprise information system (EIS) data sources referenced by the MBOs in the project are not running and available to connect to when you generate object API code.
  4. Click Next.
  5. Enter the information for these configuration options:
    Option Description
    Language Select C#.
    Platform Select NET Compact Framework 3.5 for Windows Mobile.
    Unwired Server Select the My Unwired Server connection profile.
    Server domain Select default.
    Page size

    Leave blank. This will be a message-based application, and the page size option is not enabled for message-based applications.

    Namespace Enter SUP101.
    Destination Specify the destination of the generated device client files, \SUP101. Select Clean up destination before code generation to clean up the destination folder before generating the device client files.
    Replication-based Unselect this option. This tutorial uses the Message-based synchronization option.
    Message-based Select this option to use message-based synchronization.
    Backward compatible This option is disabled.
  6. Select Generate metadata to generate metadata for the attributes and operations of each generated client object.
  7. Click Finish.