Binding a Web Service Data Source to a Mobile Business Object

Bind the attributes and operations of a Web or SOAP service to a mobile business object.

  1. In the Bind Data Source wizard, enter the following information and click Next:
    Field Action
    Data source type Select one of:
    • Web Service
    • SOAP – supported styles of service are document/literal and rpc/literal.
    Connection profile If the data source type is Web Service, select the Web Service connection profile to which you are binding your mobile business object attributes. If the required data source is not in the list, click Create to define a new connection profile.
  2. Depending on the selected data source (Web service or SOAP service), enter the attributes definition information in the Attributes wizard. This information translates into the detailed tabular view of the Web service which is mapped to mobile business object attributes.
    Field Action (Web service data source)
    Method The Web service method of the data source that is to be mapped to the mobile business object. To change the method, select a different one from the drop-down list.
    Binding A binding defines message format and protocol details for operations and messages defined by a particular portType. Since multiple ports can be associated with a single binding, a default port is selected. To change the binding, select a different port from the drop-down list.
    Configure XSLT To map Web service methods to mobile business object attributes, the Web service response message is converted to a table format. Select the Edit or Add button to invoke the Edit XSLT dialog, where you can define or adjust the XSLT that is used to flatten the response messages. Options include:
    • Generate XSLT from response message elements selection – Unwired WorkSpace automatically creates the XSLT and selects all elements by default. Select/unselect the desired elements to be mapped to the MBO attributes. When a complex type has one or more nested type structures, the first nested structure is automatically selected. Selecting an array (list) of a child node that is not under the same tree is not supported and generates an error.
    • Define XSLT manually – a default XSLT is generated by default. Manually edit the elements and attributes:
      • Save to file – modify by changing the selections and save to a file.
      • Load from file – since it is difficult to type in the XSLT contents accurately, this option allows you to retrieve an existing XSLT file from the file system. If you choose this option the XSLT text in the window is replaced by the information contained in the selected file.
    • OK – saves your changes and exits the dialog.
      Note:
      • A Web service response containing an <s:any> node may result in two columns being generated. Manually remove the least relevant entry in these cases.
      • When Unwired WorkSpace generates a default XSLT for transformation of the output of a Web service operation, each result field in the XSLT includes an op_bindpath setting. If you modify the XSLT, leave the op_bindpath intact, since it's value is required to match columns from the transformed result set with fields from the original enterprise information system (EIS)-returned XML response element.
    HTTP Basic Authentication Select this option and enter the user name and password in the corresponding fields to provide basic authentication to the Web service URL before gaining access to the Web service method.

    The user name and password fields can be entered directly, retrieved from a personalization key, or by selecting New key and creating a new personalization key.

    Result Checker Optionally add a result checker to the MBO.

    A result checker is a custom Java class that implements error checking for mobile business objects (MBOs). See Adding a Result Checker.

    Result Set Filters Add a custom java class to manipulate (filter) the rows or columns of data returned to the MBO. See Result Set Filters.
    Preview/Test Execute Click Preview/Test Execute to preview the results of the WSDL method invocation. You may need to enter valid values for the WSDL method parameters for the preview to succeed. Optionally, you can save multiple sets of arguemnt values into Preview/test execute configurations for reuse later. Once the preview results are verified with the provided input argument values, you can select Save as default values to save those values as the default values for the operation arguments/load arguments.
    Field Action (SOAP Service data source)
    Input SOAP message The input SOAP message from which the mobile business object attributes are derived.
    Destination URL The URL from which the SOAP message is accessible. Include the Action URI ( identifies the intent of the SOAP message) and Method name (identifies the SOAP method/operation).

    When you fill in the Input SOAP message and Destination URL fields, and implement the XSLT, the Next and Finish buttons are enabled. If you click Finish at this point, a default set of attributes mappings are automatically generated based on the SOAP message definition and you are placed in the Operation editor, from which you can define the mobile business object using the fields described for defining a Web service. Or, complete the remaining fields and click Next.

    Configure XSLT To map Web service operations to mobile business object attributes, the Web service response message is converted to a table format. Select the Configure XSLT button to display the Define XSLT dialog where you can define the XSLT used to flatten the response messages. Options include:
    • Generate XSLT from response message elements selection – Unwired WorkSpace automatically creates the XSLT and selects all elements by default. Select/unselect the desired elements to be mapped to the MBO attributes. When a complex type has one or more nested type structures, the first nested structure is automatically selected. Selecting an array (list) of a child node that is not under the same tree is not supported and generates an error.
    • Define XSLT manually – a default XSLT is generated by default. Manually edit the elements and attributes:
      • Save to file – modify by changing the selections and save to a file.
      • Load from file – since it is difficult to type in the XSLT contents accurately, this option allows you to retrieve an existing XSLT file from the file system. If you choose this option the XSLT text in the window is replaced by the information contained in the selected file.
    • OK – saves your changes and exits the dialog.
      Note: A Web service response containing an <s:any> node may result in two columns being generated. Manually remove the least relevant entry in these cases.
    HTTP Basic Authentication Select this option and enter the user name and password in the corresponding fields to provide basic authentication to the Web service URL before gaining access to the Web service method.

    The user name and password fields can be entered directly, retrieved from a personalization key, or by selecting <New key> and creating a new personalization key.

    To use the device user runtime credentials, you need to select system defined personalization keys ('username' and 'password'), in the corresponding fields.

    Result Checker Use the predefined Default or None result checker, or define and use a Custom result checker. See Adding a Result Checker.
    Result Set Filters Add a custom Java class to manipulate (filter) rows or columns of data returned for an MBO. See Result Set Filters.
    Preview/Test Execute Click Preview/Test Execute to preview the results of the SOAP method invocation. You may need to enter valid values for the SOAP method parameters for the preview to succeed. Optionally, you can save multiple sets of arguemnt values into Preview/test execute configurations for reuse later. Once the preview results are verified with the provided input argument values, you can select Save as default values to save those values as the default values for the operation arguments/load arguments.
  3. Click Finish to use default mappings, or Next to modify the columns to attributes mapping, or parameter mapping.
  4. From the Parameters page you can configure these MBO argument properties that are modeled from the data source's remote operation argument:
    • Argument – the MBO argument name
    • Datatype – datatype of the argument
    • Nullable – identifies if NULL is a valid value
    • Default value – the default value, if any, of the MBO argument

    Click Next or Finish when done.

  5. The Attributes Mapping screen provides a graphical view of the columns to table mappings. You can collapse and expand the view and click the navigational buttons to rearrange attributes, remove and add individual attributes, and remove a mapping or all mappings. Click Next or Finish when done.
    You can remove mappings without removing associated attributes from the graphical view only.
  6. After the Definition page of the New Operation wizard, you can modify operation and client parameters from the Parameters page by selecting the corresponding tab:
    • Operation Parameters – lists all operation arguments, associated datatypes, nullability, and the arguments value can be filled from attributes, client parameters, or default values.
    • Client Parameters – add client parameters used by device application users to provide values to the operation arguments during runtime.
  7. The Role Assignments screen allows you to Create, Add, and Remove role assignments from the mobile business object. Click Finish when done.
Related concepts
Result Set Filters