Fusion Middleware Documentation
Advanced Search

Oracle Enterprise Pack for Eclipse Developing Mobile Applications with Oracle Mobile Application Framework (OEPE Edition)
Close Window

Table of Contents

Show All | Collapse

16 Accessing Data on Oracle Cloud

This chapter describes how a mobile application can access data hosted on Oracle Java Cloud Service.

This chapter includes the following section:

16.1 Enabling Mobile Applications to Access Data Hosted on Oracle Cloud

Mobile applications can access SOAP web services hosted on Oracle Cloud. To enable access to the hosted SOAP web services, create a web service data control as described in Section 8.2, "Creating Web Service Data Controls." You can enable access to 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 Section 5.3.2, "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.

16.1.1 How to Authenticate Against Oracle Cloud

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:

  1. In the Project Explorer, expand the assembly project, then MAF and double-click MAF Application Editor.

  2. In the editor, select Security in the outline, and then click Create next to Default Login Server.

  3. Complete the General Options page of the Mobile Login Server Connection dialog, shown in Figure 16-1, by entering a name for the connection in the Connection Name field.

    Figure 16-1 Creating the Login to Oracle Cloud

    This image is described in the surrounding text
  4. Click Next. In the HTTP Basic Options page, enter the URL for Oracle Cloud in the Login URL field.

    Test the connection by clicking Test.

    For more information, refer to Section 21.5.2, "How to Designate the Login Page."

16.1.2 How to Create a Web Service Data Control to Access Oracle Java Cloud

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 SOAP 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 SOAP 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 16-2.

Figure 16-2 The Java Cloud Services Control Home Page

This image is described in the surrounding text

To create a web service data control:

  1. Obtain the application context root of the web service hosted on Oracle Cloud as follows:

    1. Traverse to the application home page, shown in Figure 16-3, by clicking the application in the Applications pane (shown in Figure 16-2).

    2. Copy the URL, as shown in Figure 16-3. This URL is the application context root of the WSDL document.

      Figure 16-3 Copying the Web Service Application Context Root

      This image is described in the surrounding text
  2. Choose File > New > Other to open the New dialog.

  3. Expand Oracle > Mobile Application Framework and choose Data Control and click Next.

  4. In the New Data Control wizard, shown in Figure 16-4, choose the project, and then select Web Service as the Type.

    Figure 16-4 Creating a Data Control

    This image is described in the surrounding text
  5. Click This image is described in the surrounding text next to URL to open the Data Control Source dialog, as shown in Figure 16-5.

    Figure 16-5 Entering the URL for the WSDL Document

    This image is described in the surrounding text
  6. In the URL field, paste the URL of the SOAP-based 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.

  7. On the Data Control Details page of the wizard, set the id for the new data control, and click Next.

  8. On the Web Service Data Control page of the wizard, choose the services you want and click Next.

  9. Review the options you have chosen in the summary page of the wizard, then click Finish. Configuring the Policy for SOAP-Based Web Services

You must configure a policy for a SOAP-based web service that is secured on Oracle Cloud. Using the Edit Data Service Control Policies dialog, described at Section 8.5, "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 Oracle Fusion Middleware Securing Web Services and Managing Policies with Oracle Web Services Manager.


Only the oracle/wss_http_token_over_ssl_client_policy is supported for SOAP-based web services. For RESTful web services, MAF supports both basic authentication and SSL policies.

16.1.3 What Happens When You Deploy a Mobile Application that Accesses Oracle Java Cloud Service

After you deploy the application, the operations of the web service data control retrieve the data from a web service running on the Oracle Java Cloud Service instance.