Browsing for Java Parameter or Return Value Types

Parameters and return values used in the Java Service interfaces must be Java class names or primitive Java datatypes. The type browser allows you to browse for Java classes in your project's Java build path when specifying the datatype for Java service operation parameters.

Generating Java classes for XML schemas

If you have types defined in an XML schema, you can generate Java classes for those types. Import the XSD file that contains the XML schema to your project. In WorkSpace Navigator, right-click the XSD file and choose Create Java Bindings from the context menu.

To browse for a Java type:

  1. On the Service Interface page, expand the Operation Parameters section.

  2. If the Properties Panel, is not visible, display it by:

    • Right-clicking on the background of the Service Interface page and choosing Show Properties Panel from the context menu, or

    • Clicking the properties panel icon in the title bar of the Operation Parameters section.

  3. Highlight the parameter of interest to display its properties in the Properties Panel.

  4. Click Browse for Complex Type. The New Parameter dialog box displays with these fields and controls:

    New Parameter dialog

    PropertyDescription
    NameThe parameter name. For input parameters, this matches to the name of the corresponding Java method parameter.
    DescriptionAn optional description of the parameter.
    Type

    The parameter or return value datatype.

    Array DimensionsThe number of array dimensions. A value of 0 (the default) indicates a scalar type. A value of 1 indicates a single dimension array, such as Integer[], a value of 2 indicates a 2-dimensional array such as int[][], and so forth.
    BrowseLaunches the type browser.
  5. Click Browse to launch the Parameter Type browser.

  6. In the top field of the Parameter Type browser, type the first few letters of the unqualified type name, for example typing Dim displays java.awt.Dimension, org.apache.attachments.DimeBodyPart and other classes that start with these letters. Matching class names display in the Matching Types field. The Qualifier field displays the package name for the class that is highlighted in the Matching Types field as well as the build path element (JAR file or class path directory) from which the class is loaded.

    When you have highlighted the type you want to use, click OK to close the Parameter Type browser and apply the type name to the New Parameter dialog.

    Note

    If Java types that you want to use are not displayed in the type browser, make sure the JAR files or class directories that contain these classes are in the project's Java Build Path.

  7. In the New Parameter dialog, confirm the array dimension setting and click OK to apply the settings to the parameter properties in the Properties Panel.

Editing Java Service Operation Parameter Properties

Editing Java Service Operation Parameter Lists

Editing the Java Source Code for a Service

Configuring Java Builder Resource Filters

Java Service Datatypes

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com