Bind the attributes and operations of a REST (Representational State Transfer) Web service to a mobile business object.
Field | Action |
---|---|
Data source type | REST Web Service |
Connection profile | Select the REST 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. |
Tab | Description |
---|---|
Resource base URL | The base URL for a REST Web service resource URL, required to construct the resource URI. For example, http://example.com. The base URL was defined in the connection profile, and is shown (read-only) in the definition page for attributes or operations. |
Resource URI template | The URI template is appended to the base URL (for example, customers/{id}). The template determines how the URI is parsed so all possible parameters are retrieved. All parameters are treated as enterprise information system (EIS) operation arguments, enabling MBO create, read, update, and delete (CRUD) operations on the REST Web service resources. You can specify the datatype for parameters defined in the URI template using this format: {paramName(xsdType)} For example, '/getCustomer/{id(int)}'. A string datatype is used if you do not explicitly specify the datatype. You can also specify support of nullable for the parameter as: '/getCustomer/{id(int?)}'.
These datatypes can be specified in the URI template and are case-sensitive:
|
HTTP method | The method called, either GET, PUT, POST, or DELETE. |
Expected status code | All available HTTP status codes are shown in the drop-down list. The default is 200. If you change it to NONE, it means that the returned status code is not checked. For each EIS REST Web Service operation, you can choose an HTTP status code as the expected status code. If the returned status code is the same as the specified expected status code, the EIS operation was executed successfully. If the returned status code does not match the specified expected status code, the EIS operation fails. |
Representation |
Allows you to specify the request or response representation. Select the representation type:
Enter or select:
Click Edit to specify the XML schema for a request or response representation, instead of referencing an existing representation:
Only one XSD can be defined for a given representation.
Define XSLT manually – for
response representation, after the XSD definition and
root element was specified, SAP Mobile WorkSpace
automatically generates a default XSLT for the response
representation. You can open the XSLT editing dialog to
modify the XSLT. Modifying multi-XSLTs for one response
representation to support shared read MBOs is also
supported. All available XSLT definitions are listed in
the table in the XSD definition dialog:
Select OK to save your definition and exit the dialog. |
Authentication |
Supports HTTP Basic Authentication:
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 from the drop-down list. |
HTTP header | Captures all properties needed to execute or manage the REST Web Service. You can enter the existing HTTP header as defined in the HTTP specification, or declare your own HTTP header.
For each element of the HTTP header you can:
The Input/Output/Both setting determines if Variable and Value are enabled:
|
Click Next or Finish when done.