Generating Bridge API Code


Using the Bridge Designer you can generate Java, Java-based VBI Script, or .NET C# classes and then create, modify, and optimize these calls within the designer. The resulting code can be used or customized in your application.

By default, generated code is opened in the designer's internal text editor. If you designate a system editor (like Visual Studio), your options in working with the generated code are limited by the capabilities of that particular editor.

To generate bridge API code

  1. From the Actions menu, choose Generate Code.
  2. From the Generate Code dialog box, from the Generators list, select a code generator.
  3. (Optional) Click the Advanced button, and provide the following information:
    If you are
    Do this
    Generating a Java class Provide a package name and class name.

    The Package field is blank by default, but the Class Name is derived from your project name. If your project name includes any characters that invalidate the class name (such as spaces, dots, and apostrophes), they are removed automatically.

    Select Generate Web Service to create a web service using the service name, target namespace, and JAR name you provide. The generated web service is saved in your Project directory.

    Generating a .NET C# class Provide a namespace and class name.

    The Namespace field is blank by default, but the Class Name is derived from your project name. If your project name includes any characters that invalidate the class name (such as spaces, dots, and apostrophes), they are removed automatically.

    Generating a VBI Script Java class Provide a package name and class name.

    The Package field is blank by default, but the Class Name is derived from your project name. If your project name includes any characters that invalidate the class name (such as spaces, dots, and apostrophes), they are removed automatically.

    Select Generate Web Service to create a web service using the service name, target namespace, and JAR name you provide. The generated web service is saved in your Project directory.

  4. Select an output option:
    To
    Select this check box
    Paste the generated code into your development environment Copy Generated Code to Clipboard.
    Have the designer paste the code into an editor for you Open Generated Code in an Editor. This is the designer's internal text editor or your system's default editor (the one associated with the file type you are generating). To specify which editor to use, from the Window menu, choose Editor Type Preferences.
  5. (Optional) Modify the default code formatting options.

    The code generators add comments, white space, and error handling template code by default. If you are going to make extensive modifications to the code, it may be simpler if you clear one or both of the code formatting options check boxes.

  6. Click OK. Bridge API code is generated and provided per the output option selected. When the code is generated, any data marked as sensitive is replaced with the commented string: sensitive data removed. For this code to work as it does in the designer, you will need to replace this string with the actual sensitive data.

 

Related Topics
Bullet Generating Host Access Code
Bullet Using the Internal Code Editor
Bullet Using Web Services
Bullet Setting the Default Code Editor
Bullet CICS 3270 Bridge Interface API Guides