Oracle® Fusion Middleware Mobile Client Developer's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1.5.0) Part Number E14826-02 |
|
|
View PDF |
This chapter describes how to integrate a third-party Web service into ADF Mobile client applications.
This chapter includes the following sections:
Section 12.1, "Introduction to Web Services in ADF Mobile Client Applications"
Section 12.2, "Creating and Using Web Service Data Controls"
Web services let you expose business functionality irrespective of the platform or language of the originating application. For more information, see "Introduction to Web Services in Fusion Web Applications" section in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
The most common way of using Web services in an application developed with Oracle ADF Mobile client is to create a data control for a Web service. Typically, this is done for the following reasons:
To add functionality that is readily available as a Web service, but which would be time-consuming to develop within the application.
To provide access to an application that runs on a different architecture.
To enable reuse of components created by the mobile client to make them available as Web services for other applications.
For more information about Web service data controls and their usage, see the following:
"What You May Need to Know About Web Service Data Controls" section in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
"Data Controls in Oracle ADF Fusion Web Applications" appendix in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
"Using the Data Controls Panel" section in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework
JDeveloper lets you create a data control for an existing Web service using only the Web Services Description Language (WSDL) file for the service. You can either browse to a WSDL file on the local file system, locate one in a Universal Description, Discovery and Integration (UDDI) registry, or enter the WSDL URL directly.
Note:
If you are working behind a firewall and you want to use a Web service that is outside the firewall, you must configure the Web Browser and Proxy settings in JDeveloper. For more information, see "Setting Browser Proxy Information" section in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.To create a Web service data control:
In the Application Navigator, right-click the application name, and then select New.
In the New Gallery dialog, select the All Technologies tab, and then expand the Business Tier node on the left. Select Web Services, and then Web Service Data Control from the Items list on the right (see Figure 12-1), and click OK.
Follow the wizard instructions to complete creation of the data control.
Note:
The mobile client supports the following encoding styles for both SOAP 1.1 and 1.2 versions:Document/literal
Document/wrapped
RPC
After creating a Web service data control, you can modify the endpoint. This is useful in such cases as when you migrate the application from a test to production environment.
You can modify the endpoint by editing the connections.xml
file.
Alternatively, to change the endpoint for a Web service data control:
In the Application Navigator, select the .dcx
file for the Web service data control.
In the Structure view, right-click the Web service data control and choose Edit Web Service Connection from the context menu to open the Edit Web Service Connection dialog.
In the Edit Web Service Connection dialog, make the necessary changes to the endpoint URL and port name.
Click OK.
The connection information for the Web service is stored in the connections.xml
file along with the other connections in your application. You do not need to explicitly create this file, as it is generated in the .adf/META-INF
directory by the New Web Service Data Control wizard at the time when the Web service data control is created (see Section 12.2.1, "How to Create a Web Service Data Control").
You modify the connection settings by editing the connections.xml
file.
Web services allow applications to exchange data and information through defined application programming interfaces. The mobile client provides the following means of securing Web service data controls:
Secure Sockets Layer (SSL): provides secure data transfer over unreliable networks.
Java Key Store (JKS): provides message-level security for which Web service data controls can be configured.
Note:
Currently, the mobile client only supports basic authentication (BASIC_AUTH
) over HTTP and HTTPS.For more information, see the following:
Sections about SSL configuration and managing key stores in Oracle Database Administrator's Guide
Section about configuring policies in Oracle Fusion Middleware Security and Administrator's Guide for Web Services