This chapter includes the following section:
MAF applications can access both SOAP and REST web services hosted on Oracle Cloud.
When you drag and drop a data control into a MAF AMX UI component, as described in How to Add UI Components to a MAF AMX Page.
Programmatically, for applications whose content is delivered from 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 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 23-2.
Figure 23-2 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 23-3, by clicking the application in the Applications pane (shown in Figure 23-2).
Copy the URL, as shown in Figure 23-3. This URL is the application context root of the WSDL document.
Figure 23-3 Copying the Web Service Application Context Root
In JDeveloper, right-click the view controller project in the Application Navigator and then open the Create Web Service Data Control Wizard, as described in Creating a Web Service Data Control Using SOAP.
In the Data Source page, shown in Figure 23-4, enter the name of the data control.
Figure 23-4 Entering the URL for the WSDL Document
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.
Enable the data control to access the WSDL by appending a web service port name and ?wsdl
to the application context root, such as HCMServicePort?wsdl
in Figure 23-4.
In the Data Controls Operations page, shown in Figure 23-5, select from among the web service operations that can be used by the application feature to retrieve data, and then click Finish.
Figure 23-5 Selecting the Web Service Operations
Figure 23-5 shows the web service operations returned by the MAF design time that can be made available to the MAF application. In this example, the design time has queried a web service that hosts human resources data and has returned operations to retrieve employee data, including expense approvals.
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 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.
Note:
Only the oracle/wss_http_token_over_ssl_client_policy
is supported for SOAP-based web services. For REST-based web services, MAF supports both basic authentication and SSL policies.