This chapter includes the following sections:
You can use OEPE to work with Oracle Cloud services to develop and deploy groupings of APIs that are designed to support a specific set of applications.
Oracle Mobile Cloud Service enables you to develop and deploy groupings of APIs that are designed to support a specific set of applications. These APIs are available in the MCS mobile backend. You can develop mobile applications which you associate with the mobile backend to access those APIs.
Figure 17-1 illustrates the overall architecture of Oracle Mobile Cloud Service and how it works with mobile applications and enterprise services.
Figure 17-1 MCS Architecture
The mobile backend for MCS contains the platform APIs, custom APIs and connectors, including REST.
For more information about MCS, see http://cloud.oracle.com/mobile
OEPE allows you to create mobile applications that use services provided on an MCS backend.
Before you can sign in to an Oracle Cloud service, you must have a user account that defines your credentials (user name, password, and identity domain) and access rights to the service.
For information about requesting a trial subscription to an Oracle Cloud service, or purchasing a subscription to an Oracle Cloud service, see Getting Started with Oracle Cloud.
When an Oracle Cloud service is activated, Oracle sends the sign-in credentials and URL to the designated administrator. The administrator then creates an account for each user who needs access to the service. Check your email or contact your administrator for your account credentials and service URL.
Once you have a subscription to MCS, you create a connection to MCS following the instructions in "Integrating Oracle Cloud Services" in Oracle Enterprise Pack for Eclipse User's Guide.
You can use mobile services created in MCS to build mobile apps.
In this case, the MCS APIs you will typically use include:
Tooling APIs for:
Asset Catalog (for APIs, API implementations, mobile backends, connectors)
Notifications
UI Tooling for Mobile API test invocation
User management for roles, user names, to use for testing the service
Collections APIs to access from custom code
System API for integrating notifications from the custom code
The steps you perform include the following:
Search for the API you want to use.
Implement the API:
Download the scaffolding.
Unzip and open the Javascript file in OEPE.
Implement the endpoints in OEPE by editing methods in the Javascript file:
Get the connectors available for the custom code to use.
Get the notification API for integration within the custom code.
Rezip the scaffolding and upload it to the implementations for the service.
Test the API endpoints from the IDE by selecting the mobile backend and the backend version. Unless the API is set to allow unauthenticated access, you will have to use a user name and password.
You can create mobile applications that use services provided on an MCS backend.
Tooling APIs for:
Asset Catalog (for APIs, policies, notifications)
Storage
UI Tooling for Mobile API test invocation
User management for roles, user names, to use for testing the service
Platform APIs for storage collection
Custom APIs for runtime URLs of the services defined in MCS by the customer
The steps you perform include the following:
The resources for mobile applications including APIs are stored in a container called a mobile backend. Within the mobile backend you register the apps that can access the mobile backend and you select the PAIs that you want available for those apps.
You can have multiple backends, each serving a set of applications. In addition, you can have APIs that are used by multiple backends.
When an app accesses APIs through MCS, it is always in the context of a mobile backend. The app authenticates with the mobile backend credentials as well as with a user name and password (or an anonymous access key). If the called API includes calls to other APIs within the backend, the identity and credentials of the original caller are propagated through the chain of calls.
For more information about mobile backends, and using Oracle Mobile Cloud Service as a platform, see "Using Oracle Mobile Cloud Service" in Using Oracle Mobile Cloud Service
In order to work with a REST API you import a RAML definition from an MCS API. There are two ways that you can do this:
From a connection in Oracle Cloud view.
Using the REST Service Editor.
Before you begin
You need to have a connection from OEPE to MCS in the Oracle Cloud view.
You can import RAML definition from:
A Mobile Cloud Service backend's API. You must have a connection to Oracle Mobile Cloud Service.
A RAML file.
For more information about the REST Service Editor, see Working with REST Services.
To import a REST API:
Mobile applications can access RESTful web services by creating a web service data control. Depending on the content type, mobile applications can access cloud data by dragging and dropping a data control into a MAF AMX user interface component, as described in How to Add UI Components and Data Controls to an MAF AMX Page, or programmatically, for applications whose content is delivered from a either a remote web server, or from locally stored HTML files.
You use the MAF Login Server Connection dialog to create a login server connection to authenticate against Oracle Cloud.
Before you begin
Obtain the Oracle Cloud URL that is used for the login server connection.
To create a login URL with an Oracle Cloud endpoint:
The Create Data Service Control Wizard enables you to create the data control that accesses the hosted data. You use the WSDL URL of the web service deployed to Oracle Java Cloud to create this data control. If you do not know this URL, then you must create the URL to the WSDL document by appending the web service port name and ?wsdl
to the application context root.
Before you begin
You must have access to a web service application that has been deployed to Oracle Java Cloud Service. This application must be available through the Applications pane of the Oracle Java Cloud Service Control home page. In addition, its Status and State must be noted as both Up and Active, respectively, as illustrated by the HCMMobileService application shown in Figure 17-5.
Figure 17-5 The Java Cloud Services Control Home Page
To create a web service data control:
Obtain the application context root of the web service hosted on Oracle Cloud as follows:
Traverse to the application home page, shown in Figure 17-6, by clicking the application in the Applications pane (shown in Figure 17-5).
Copy the URL, as shown in Figure 17-6. This URL is the application context root of the WSDL document.
Figure 17-6 Copying the Web Service Application Context Root
Choose File > New > Other to open the New dialog.
Expand Oracle > Mobile Application Framework and choose Data Control and click Next.
In the New Data Control wizard, shown in Figure 17-7, choose the project, and then select Web Service
as the Type.
Figure 17-7 Creating a Data Control
Click next to URL to open the Data Control Source dialog, as shown in Figure 17-8.
Figure 17-8 Entering the URL for the WSDL Document
In the URL field, paste the URL of the web service that is deployed to (and currently running on) Oracle Cloud Java Service and click OK, and on the Data Control Source page, click Next.
On the Data Control Details page of the wizard, set the id for the new data control, and click Next.
On the Web Service Data Control page of the wizard, choose the services you want and click Next.
Review the options you have chosen in the summary page of the wizard, then click Finish.
You must configure a policy for a web service that is secured on Oracle Cloud. Using the Edit Data Service Control Policies dialog, described at Accessing Secure Web Services, you can select the oracle/wss_http_token_over_ssl_client_policy
. For descriptions of this (and other) policies, see "Determining Which Predefined Policies to Use" and "Predefined Policies" chapters in Securing Web Services and Managing Policies with Oracle Web Services Manager.