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 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 – select the elements and attributes to be mapped from the generated list. 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 – includes the elements and attributes you have selected in a file format:
      • 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 the 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 Click Preview to preview the results of the WSDL method invocation. You must enter values for the WSDL method parameters, and/or optionally set the preview/Test Execute configurations.
    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 – select the elements and attributes to be mapped from the generated list. 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 – includes the elements and attributes you have selected in a file format:
      • 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 the 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.

    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 Click Preview to preview the results of the SOAP method invocation. You must enter values for the SOAP method parameters, and/or optionally set the preview/Test Execute configurations.
  3. Click Finish to use default mappings, or Next to modify the columns to attributes mapping, or parameter mapping.
  4. The Parameters Mapping screen provides a graphical view of the parameter-to-remote operation mappings. Modify the default parameter mappings by using Add, Delete and Delete all. Make a connection between parameters by dragging a line from the source to the target. Parameter properties include:
    • Parameters
      • Parameter name – name of the mobile business object parameter. Names cannot contain C# or Java reserved words.
      • Datatype – enter the datatype of the parameter. It must be compatible with the datatype of the remote parameter to which it is mapped.
      • Required – The parameter is required. For example, a deployed MBO that contains user name and password parameters would require this information be supplied by the client.
    • Data Source
      • Argument – include any arguments to be passed to the parameter used by the MBO operation on the Unwired Server side when executing an MBO operation.
      • Datatype – displays the datatype to which the parameter is mapped.
      • Default value – enter a default value for the argument, or select <no default value> from the drop-down list.

    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. 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