You must explicitly register the application connection using the
SAP Mobile Platform. You can specify customized application properties for
the client with the request. You should provide the application connection ID, X-SUP-APPCID,
using an explicit request header or a cookie. If the value is missing, the
SAP Mobile Server generates a Universally Unique ID (UUID), which is
communicated to the device through response cookie X-SUP-APPCID.
Note: OData proxy client must support cookies for registered users.
During registration, the server sends the X-SUP-APPCID in a cookie. The client sends
the cookie back in subsequent requests or set the X-SUP-APPCID in a header.
Create an anonymous or authenticated application connection by issuing a
POST request to the following URL, and include the application connection properties in
the request.
http://host:port/[public/]/odata/applications/{v1|latest}/{appid}/Connections
The URL contains these components:
- host – host is defined by host name and should match with the domain
registered with SAP Mobile Platform. If the
requested domain name does not match, default domain will be used.
- port – The port for listening for OData requests; by default,
8000.
- “public” prefix – If included, an anonymous security configuration is used.
- odata/applications/ – OData services associated to the application resources.
- {V1|latest} – The version of the application. Current supported application
version is 1. so in this case, version 1 is the latest version.
- appid – The name of the application.
- Connections – The name of the OData collection.
Application connection properties are optional. You can create an
application connection without including any application properties. For the usage and
description of application connection properties, search for Application Connection Properties in System Administration .
DeviceType is an application
connection property that you may typically set. Valid values for DeviceType are:
- Android – Android devices.
- iPhone – iOS devices.
- Blackberry – Includes devices with BlackBerry OS 5 and below.
- Rim6 – Includes devices with BlackBerry OS6 and above.
- WinMobile – Includes devices with Windows Mobile 5 for Pocket PC and Windows
Mobile 6 Professional.
- WinSmartPhone – Includes devices with Windows Mobile 5 for Smart Phone and
Windows Mobile 6 Standard.
- Windows – Includes desktop or servers with Windows OS, such as Windows XP,
Windows Vista, Windows 7, Windows Server series OS.
Specifying any other value for DeviceType causes "Unknown" to be returned in the DeviceType column.
For following example shows the HTTP request body to register an
application connection using default values for all properties.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<content type="application/xml">
<m:properties/>
</content>
</entry>