Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview
Java APIs are business interfaces based on Java classes. Some specialized Java APIs whose methods must
use parameters of either serializable Java Beans or simple data types such as String, Int, and so forth can
be categorized as Java Bean Services. Some Java class provides access to business logic governing the
OA Framework-based components and pages. Such Java classes are called Application Module
Services and are also categorized as a subtype of Java interface.
To locate these subtype of Java interfaces, perform a search by specifying "Interface Subtype" as the
Category and "Java Bean Services" or "Application Module Services" as the Category Value. Both Java Bean
Services and Application Module Services can be exposed as REST services only.
Once Java Bean Services or Application Module Services have been successfully deployed as REST
services, an integration developer can invoke the deployed REST services from client program using
languages like Java, PHP, Javascript, Python, and so on.
To better understand how to use Java APIs as REST services to fetch and use application data, an interface
type of Java Bean Services is used as an example to explain detailed design-time and runtime tasks in this
chapter. For the example described in the following sections, Oracle JDeveloper 11g (11.1.1.6.0) is used to
create a project with a Java class and invoke the service.
Similar to Java Bean Services, Application Module Services are a subtype of Java interface and can be
exposed as REST services with GET and POST HTTP methods. Therefore, the service invocation for
Application Module Services will use the similar approach as described for Java Bean Services to invoke the
Application Module REST services. That is, deploy an interface type of Application Module Services as a
REST service first, then create a security grant and record the deployed WADL, then create a project with a
Java class, and then invoke the REST service using a Java class.
This chapter includes the following REST service invocation examples for Java Bean Servivces:
A Java client is used to make HTTP GET request to the getRestInterface service operation. The
getRestInterface service operation returns the details of a REST service identified by its internal name.
In this example, HTTP Basic Authentication scheme is used to provide username and password information
in the HTTP request header. The user credentials are authenticated and authorized by ISG's REST Service
Provider. After validation, the getRestInterface service operation executes the request for the
authenticated user.
After the successful service invocation, the client will receive a REST response message with the details of
the REST service whose internal name has been passed in HTTP URL at run time during service invocation.
1. Log in to Oracle E-Business Suite as a user who has the Integration Administrator role.
Select the Integrated SOA Gateway responsibility and the Integration Repository link from the
navigation menu.
2. In the Integration Repository tab, click Search to access the main Search page.
The alias will be displayed as the service endpoint in the WADL and schema for the selected
method or operation.
In the Service Operations region, HTTP method check boxes are preselected.
Please note that if a Java method is annotated with a specific HTTP method, then the
corresponding HTTP method check box is preselected for that method. The administrator can
change the HTTP method check box selection before deploying the service.
For more Java Bean Services annotation guidelines, see Annotations for Java Bean Services.
In this example, the 'getRestInterface' service operation has been annotated with the GET
HTTP method; therefore, the GET check box is automatically selected.
6. Click Deploy to deploy the service to an Oracle E-Business Suite WebLogic environment.
Once the REST service has been successfully deployed, 'Deployed' appears in the REST Service Status field
along with the View WADL link. Click the View WADL link to view the deployed service WADL description.
For more information on deploying REST services, see Deploying REST Web Services, Oracle E-Business
Suite Integrated SOA Gateway Implementation Guide.
2. Perform a search to locate the REST Service Locator service the administrator just deployed earlier.
3. In the interface details page of the selected custom Java Bean Services, click the Grants tab.
4. Select the getRestInterface method check box and then click Create Grant.
Click Create Grant. This grants the selected method access privilege to all Oracle E-Business Suite
users.
Copy or record the following information which will be used later when defining a Java client:
<resources base>="http://<hostname>:<port>/webservices/rest/servicelocator/">
<resource path>="/getRestInterface/{irepClassName}/">
This information /getRestInterface/{irepClassName}/ will be used later to form the later part of the
service URL. The input {irepClassName} is a path variable, and it will be replaced with the internal
name of an interface.
In the New Gallery window, expand the General category and select 'Applications'. In the Items list,
select Custom Application.
4. The "Create Custom Application - Name your project" page is displayed. Enter an appropriate name
for the project in the Project Name field, for example ISGJavaRESTClient.
In the Project Features tab, select 'Java' from the Available list. Move the selected feature from the
"Available" window to the "Selected" window using the right arrow button.
Click Next.
6. Select and right-click on the project name you just created in the Application Navigator and
choose New from the drop-down selection menu.
7. In the New Gallery window, expand the General category and select 'Java'. In the Items list,
select Class. Click OK.
Replace the skeleton class definition with the following Java code:
package isgrestget;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import com.sun.jersey.core.util.Base64;
/**
* This Method invokes the a rest service using HTTP GET Method with path parameter in URL
*/
public static void invokeREST(String svcUrlStr,String username,String passwd,String pathParam) throws
IOException {
String getURL = svcUrlStr + "/" + pathParam;
URL url = new URL(getURL);
//Obtaining connection to invoke the service
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
String auth = username + ":" + passwd;
byte[] bytes = Base64.encode(auth);
String authStr = new String(bytes);
/**
* This method reads response sent by the server and returns it in a string representation.
*/
private static String readHttpResponse(HttpURLConnection conn) {
InputStream is = null;
BufferedReader rd = null;
StringBuffer response = new StringBuffer();
try {
if (conn.getResponseCode() >= 400) {
is = conn.getErrorStream();
} else {
is = conn.getInputStream();
}
rd = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = rd.readLine()) != null) {
response.append(line);
response.append('\n');
}
} catch (IOException ioe) {
response.append(ioe.getMessage());
} finally {
if (is != null) {
try {
is.close();
} catch (Exception e) {
}
}
if (rd != null) {
try {
rd.close();
} catch (Exception e) {
}
}
}
return (response.toString());
}
Please note that resource information recorded earlier from the deployed WADL is now placed in the
baseUrl and svcUrlStr1 elements. PLSQL:FND_PROFILE is the interface internal name and that it is
assumed to be deployed in the instance.
Note: Use https (instead of http) in the baseUrl if your Oracle E-Business Suite instance is running
on the TLS-enabled environment. Additionally, you need to import the TLS certificate into your client
JVM's keystore.
Use the following steps to add the required library file to the project properties.
a. Select and right-click on the project name you just created earlier to open a selection menu.
c. Select Libraries and Classpath, and click Add Library. The Add Library dialog box opens.
d. In the Add Library dialog box, select the Project folder and then click New.
Click Add Entry. The Select Path Entry dialog box appears.
f. In the Select Path Entry dialog box, locate and select the 'Jersey-bundle_1.0.0.0_1-1-5-1.jar' file
that you have downloaded. This adds it to the Classpath.
g. The Project Properties dialog box appears. Click OK. This project is now set up with the
required library.
1. In the Application Navigator, right-click on the RestInvocationGETMethod.java Java class you just
created at the design time. Select Make from the menu.
2. Right-click on the RestInvocationGETMethod.java Java class. Select Run from the menu.
Monitor this process and check for successful compilation in the Log window. Verify that the execution is
successful in the Log window.
In this example, getRestInterface Java method is exposed as a REST service operation with GET method.
There is no input payload for GET method. The path variable {irepClassName} is replaced with actual
value "PLSQL:FND_PROFILE" sent as part of the HTTP URL shown below when the getRestInterface REST
service operation is invoked.
URL = http://<hostname>:<port>/webservices/rest/servicelocator/getRestInterface/PLSQL:FND_PROFILE
Note: For GET requests, JSON is the default output response format. Use Accept header application/xml to
receive response in XML format. If Content-Type header is sent in GET HTTP request, it will be ignored.
Request Headers
Authorization: Basic c3lzYWRtaW46c3lzYWRtaW4=
Accept: application/json
Content-Language: en-US
When the REST service is successfully invoked, the following output in JSON format appears in the Log
window:
{
"OutputParameters" : {
"EbsRestServiceBean" : [ {
"alternateAlias" : "plsql/PLSQL:FND_PROFILE",
"serviceAlias" : "profile",
"serviceName" : "PLSQL:FND_PROFILE",
"wadlUrl" : "http://<hostname>:<port>/webservices/rest/profile?WADL"
} ],
"ControlBean" : [ {
"fields" : "",
"filter" : "",
"limit" : "",
"offset" : ""
} ]
}
}
Notice that the service information identified by its internal name PLSQL:FND_PROFILE is returned. For
example, the WADL URL, service name, and service alias are included as part of the response message.
To get employee details, an HTML page with Javascript is used to make HTTP GET request to the
getPersonInfo service operation contained in the custom API. An employee ID is provided at run time for
the service to retrieve the associated employee name and the employee's manager name. After the
successful service invocation, the employee details corresponding to the employee ID are displayed in the
HTML page.
To get direct reports for the logged in user, a different HTML page with Javascript is used in this scenario to
make HTTP GET request to the getDirectReports service operation. The logged in user credentials are
provided when the getDirectReports service operation is invoked. After the successful service invocation,
the logged in user's subordinates or the user's direct reports are displayed in the HTML page with the
requested number of records shown in each page.
High Level Process Flow for Creating Custom Java Bean Services
To develop custom Java Bean Services, an integration developer needs to create and annotate the custom
Java APIs based on the Integration Repository Annotation Standards for Java Bean Services. After the
interface creation, an integration administrator needs to validate the annotated APIs. If no error occurs
during the validation, the administrator will then upload the custom APIs to Oracle Integration Repository
where they can be published as REST services through Oracle E-Business Suite Integrated SOA Gateway.
Annotating and Invoking a Custom Java Bean Service from HTML Pages with Javascript
Based on the REST service invocation scenario, the following tasks are included in this section:
3. Parsing and Uploading the Annotated Custom Java Bean Service to the Integration Repository
During the planning stage, use the following guidelines to plan and develop the custom Java APIs that will
be exposed as REST services through Oracle E-Business Suite Integrated SOA Gateway:
1. Develop a Java class whose public methods provide business functionality. Business logic should be
embedded into these public methods.
o The custom Java APIs and method names will be used in Web service URL. Therefore, ensure to
provide friendly names.
o If you need initialized Oracle E-Business Suite Context within the Java method, ensure the
following:
Retrieve fully initialized Oracle E-Business Suite WebAppsContext based on the request
header / security token.
o You may use the Oracle E-Business Suite Integrated SOA Gateway database connections within
the Java APIs.
o Oracle E-Business Suite Integrated SOA Gateway provides a standard exception handling from
the infrastructure. Ensure that the Java APIs throw or rethrow a throwable exception whenever
an error condition occurs.
2. If above Java methods require complex data objects to be exchanged as input and output
parameters, then develop Java Beans.
o Implement java.io.Serializable.
o Have accessor methods, following 'get' and 'set' naming convention, for private attributes.
In this example, you need a service that will return the details of a specific person in the hierarchy of the
logged in user, as well as return all the reports of the logged in user.
A Java class EmployeeInfo.java contains the following three methods. Based on the scenarios, they
are read-only methods and we will map each Java method to HTTP GET verb.
o getAllReports - This method returns an array of all reports of the requesting user.
o getDirectReports - This method returns a list of direct reports of the requesting user.
o getPersonInfo - This method returns the person details for a specific person Id.
This method requires a key identifier parameter for "Person Id". Therefore, personId will be
annotated as key_param.
...
* @param personId Person Identifier
* @rep:paraminfo {@rep:required} {@rep:key_param}
...
Use the following steps to create and compile custom Java APIs:
In the New Gallery window, expand the General category and select 'Applications'. In the Items list,
select Custom Application.
Click OK. The "Create Custom Application - Name your application" page is displayed.
3. Enter an appropriate name for the application in the Application Name field. Click Next.
4. The "Create Custom Application - Name your project" page is displayed. Enter an appropriate name
for the project in the Project Name field, for example 'ISGJava_RESTDemo'.
In the Project Features tab, select 'Java' from the Available list. Move the selected feature from the
"Available" window to the "Selected" window using the right arrow button.
Click Next.
Use the following steps to add the required library files to the project properties.
a. Select and right-click on the project name "ISGJava_RESTDemo" you just created earlier to
open a selection menu.
c. Select Libraries and Classpath, and click Add Library. The Add Library dialog box opens.
e. Click Add JAR/Directory. The Add Archive or Directory dialog box appears.
Browse the directory and locate the 'fndall.jar' file. Click Select to add the selected 'fndall.jar'
file.
8. In the New Gallery window, expand the General category and select 'Java'. In the Items list,
select Class. Click OK.
9. In the Create Java Class dialog, create a Java class called PersonBean.java with the following
information:
a. Name: PersonBean
b. Package: oracle.apps.per.sample.beans
c. Extends: java.lang.Ojbect
import java.io.Serializable;
import java.util.Date;
Name: PerServiceException
Package: oracle.apps.per.sample.common
Extends: java.lang.Ojbect
package oracle.apps.per.sample.common;
import oracle.apps.fnd.isg.app.ebs.rt.common.ServiceException;
public PerServiceException(Throwable t) {
super(t);
}
Name: EmployeeInfo
Package: oracle.apps.per.sample.service
Extends: java.lang.Ojbect
Use the following Java code for EmployeeInfo.java:
package oracle.apps.per.sample.service;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import oracle.apps.fnd.common.WebAppsContext;
import oracle.apps.fnd.isg.common.IContext;
import oracle.apps.fnd.isg.common.mgr.ContextManager;
import oracle.apps.fnd.isg.common.mgr.DBConnectionManager;
import oracle.apps.per.sample.beans.PersonBean;
import oracle.apps.per.sample.common.PerServiceException;
import oracle.jdbc.OraclePreparedStatement;
import oracle.jdbc.OracleResultSet;
/**
* A sample class to demonstrate how Java API can use the ISG REST framework. This class provides
* methods to retrieve list of direct reports, all reports of a person. It also has methods to
* retrieve personal details and accrual balance of a person.
* @rep:scope public
* @rep:product PER
* @rep:displayname Employee Information
* @rep:category IREP_CLASS_SUBTYPE JAVA_BEAN_SERVICES
*/
public class EmployeeInfo {
public EmployeeInfo() {
super();
}
/**
* This method returns a list of direct reports of the requesting user.
*
* @return List of person records who are direct reports
* @rep:paraminfo {@rep:innertype oracle.apps.per.sample.beans.PersonBean}
* @rep:scope public
* @rep:displayname Get Direct Reports
* @rep:httpverb get
* @rep:category BUSINESS_ENTITY sample
*/
// Demonstration of list return type
public List<PersonBean> getDirectReports() throws PerServiceException {
// Use webappscontext for apps specific validation e.g. fine grained access control etc.
int userId = wctx.getUserId();
String userName = wctx.getUserName().toUpperCase();
// Here we intend to filter based on the specific user who is invoking the service
String filter = " AND LEVEL = 2 START WITH USER_NAME = :1";
return(personList);
}
/**
* This method returns an array of all reports of the requesting user.
*
* @return Array of person records who are reporting into the requesting user's organization
hierarchy
* @rep:scope public
* @rep:displayname Get All Reports
* @rep:httpverb get
* @rep:category BUSINESS_ENTITY sample
*/
// Demonstration of array return type
public PersonBean[] getAllReports() throws PerServiceException {
// Use webappscontext for apps specific validation e.g. fine grained access control etc.
int userId = wctx.getUserId();
String userName = wctx.getUserName().toUpperCase();
// Here we intend to filter based on the specific user who is invoking the service
String filter = " START WITH USER_NAME = :1 ";
try {
Map<Integer, PersonBean> map = makeBean(filter, userName);
if (map != null)
array = map.values().toArray(new PersonBean[map.size()]);
} catch (SQLException sqle) {
throw new PerServiceException("SQL error while getting the direct reports", sqle);
}
return(array);
/**
* This method returns the person details for a specific person id. Throws error if the person
* is not in requesting user's org hierarchy.
*
* @return Details of a person in the logged on user's org hierarchy.
* @param personId Person Identifier
* @rep:paraminfo {@rep:required} {@rep:key_param}
* @rep:scope public
* @rep:displayname Get Person Details
* @rep:httpverb get
* @rep:category BUSINESS_ENTITY sample
*/
// Demonstration of simple navigation using path param
public PersonBean getPersonInfo(int personId) throws PerServiceException {
// Get the ISG context, which has runtime information
IContext ctx = ContextManager.getContext();
// Retrieve fully initialized webappscontext, as per the request header / security token
WebAppsContext wctx = (WebAppsContext) ctx.getExternalContext();
// Use webappscontext for apps specific validation e.g. fine grained access control etc.
int userId = wctx.getUserId();
String userName = wctx.getUserName().toUpperCase();
if (map == null)
throw new PerServiceException(PerServiceException.AUTHORIZATION_FAILURE, "No org hierarchy
found for user - " + userName, null);
return(bean);
personMap.put(personId, personBean);
} finally {
if (rs != null) {
try { rs.close(); } catch (Exception e) {};
rs = null;
}
if (stmt != null) {
try { stmt.close(); } catch (Exception e) {};
stmt = null;
}
return(personMap);
o Select and right-click on the project name "ISGJava_RESTDemo" and choose Make
Project1.jpr from the drop-down selection menu. The compilation process starts.
Verify that the compilation process is successful in the Message - Log window.
For information on how to deploy these custom Java classes, refer to Section 5: Deploying Custom
Application Tier Objects, Deploying Customizations in Oracle E-Business Suite Release 12.2, My Oracle
Support Knowledge Document 1577661.1.
After the successful deployment to a target instance, stop and restart the managed server.
Parsing and Uploading the Annotated Custom Java Bean Service to the
Integration Repository
Once the custom Java classes have been successfully deployed to a target instance, the integration
administrator needs to validate the annotated custom interface definition Employee Information against
the annotation standards for Java Bean Services using Integration Repository Parser. During the validation,
if no error occurs, an iLDT file will be generated. The administrator will then upload the generated iLDT file
to Oracle Integration Repository.
Perform the following steps to parse and upload the annotated custom interface definition Employee
Information to Oracle Integration Repository:
1. Source the environment in the run file system and set CLASSPATH to include all libraries and JAR files
used by the custom Java API.
2. Ensure the annotated custom interface definition and related Java classes are located in the target
instance.
7. Search the uploaded custom Java Service Beans interface "Employee Information" from the
Integration Repository.
Click the Employee Information name link to open the interface details page.
1. Log in to Oracle E-Business Suite as a user who has the Integration Administrator role.
Select the Integrated SOA Gateway responsibility and the Integration Repository link from the
navigation menu.
2. In the Integration Repository tab, click Search to access the main Search page.
Click the "Employee Information" interface name link to open the interface details page.
The alias will be displayed as the service endpoint in the WADL and schema for the selected
method or operation.
o Select the POST check box for the Get Person Details Java method. Leave the rest of
preselected check boxes unchanged.
6. Click Deploy to deploy the service to an Oracle E-Business Suite WebLogic environment.
Once the REST service has been successfully deployed, 'Deployed' appears in the REST Service Status field
along with the View WADL link. Click the View WADL link to view the deployed service WADL description.
For more information on deploying REST services, see Deploying REST Web Services, Oracle E-Business
Suite Integrated SOA Gateway Implementation Guide.
1. Log in to Oracle E-Business Suite as a user who has the Integration Administrator role. Select the
Integrated SOA Gateway responsibility and the Integration Repository link from the navigation menu.
2. Perform a search to locate the "Employee Information" service the administrator just deployed
earlier.
3. Select the "Employee Information" name link from the search result table to display the interface
details page. Click the Grants tab.
4. Select the Employee Information service and then click Create Grant.
5. In the Create Grants page, select "All Users" as the Grantee Type.
Note: In this example, the Employee Information service is granted to all users. In actual
implementation, you should define strict security rules. Create grant to a user or more appropriately
to a group of users defined by roles and responsibilities.
Click Create Grant. This grants the selected service access privilege to all Oracle E-Business Suite
users.
<grammars>
<include href="http://<hostname>:<port>/webservices/rest/empinfo/?XSD=getallreports.xsd"
xmlns="http://www.w3.org/2001/XMLSchema" />
<include href="http://<hostname>:<port>/webservices/rest/empinfo/?
XSD=getdirectreports.xsd" xmlns="http://www.w3.org/2001/XMLSchema" />
<include href="http://<hostname>:<port>/webservices/rest/empinfo/?XSD=getpersoninfo.xsd"
xmlns="http://www.w3.org/2001/XMLSchema" />
</grammars>
<resources base="http://<hostname>:<port>/webservices/rest/empinfo/">
<resource path="/getAllReports/">
<method id="getAllReports" name="GET">
<request>
<param name="ctx_responsibility" type="xsd:string" style="query" required="false" />
<param name="ctx_respapplication" type="xsd:string" style="query" required="false" />
<param name="ctx_securitygroup" type="xsd:string" style="query"
required="false" />
<param name="ctx_nlslanguage" type="xsd:string" style="query" required="false" />
<param name="ctx_orgid" type="xsd:int" style="query" required="false" />
</request>
<response>
<representation mediaType="application/xml"
type="tns1:getAllReports_Output" />
<representation mediaType="application/json"
type="tns1:getAllReports_Output" />
</response>
</method>
</resource>
<resource path="/getDirectReports/">
<method id="getDirectReports" name="GET">
<request>
<param name="ctx_responsibility" type="xsd:string" style="query"
required="false" />
<param name="ctx_respapplication" type="xsd:string" style="query" required="false" />
<param name="ctx_securitygroup" type="xsd:string" style="query"
required="false" />
<param name="ctx_nlslanguage" type="xsd:string" style="query"
required="false" />
<param name="ctx_orgid" type="xsd:int" style="query" required="false" />
</request>
<response>
<representation mediaType="application/xml"
type="tns2:getDirectReports_Output" />
<representation mediaType="application/json"
type="tns2:getDirectReports_Output" />
</response>
</method>
</resource>
<resource path="="/getPersonInfo/ {personId}/">
<param name="personId" style="template" required="true" type="xsd:int" />
<method id="getPersonInfo" name="GET">
<request>
<param name="ctx_responsibility" type="xsd:string" style="query" required="false" />
<param name="ctx_respapplication" type="xsd:string" style="query" required="false" />
<param name="ctx_securitygroup" type="xsd:string" style="query"
required="false" />
<param name="ctx_nlslanguage" type="xsd:string" style="query" required="false" />
<param name="ctx_orgid" type="xsd:int" style="query" required="false" />
</request>
<response>
<representation mediaType="application/xml"
type="tns3:getPersonInfo_Output" />
<representation mediaType="application/json"
type="tns3:getPersonInfo_Output" />
</response>
</method>
</resource>
<resource path="/getPersonInfo/">
<method id="getPersonInfo" name="POST">
<request>
<representation mediaType="application/xml" type="tns3:getPersonInfo_Input" />
<representation mediaType="application/xml"
type="tns3:getPersonInfo_Output" />
</request>
<response>
<representation mediaType="application/xml" type="tns3:getPersonInfo_Input" />
<representation mediaType="application/xml"
type="tns3:getPersonInfo_Output" /> </response>
</method>
</resource>
</resource path>
</application>
Copy or record the following information which will be used later when defining a Java client:
<resources base>="http://<hostname>:<port>/webservices/rest/empinfo/">
<resource path>="/getPersonInfo/{personId}/">
This information /getPersonInfo/{personId}/ will be used later to form the later part of the service
URL.
Note that {personId} is a path variable defined using the <param> tag. It will be replaced with
actual value (employee ID 13137 in this example) at run time when the HTTP GET method is invoked.
<resource path="/getDirectReports/">
This information /getDirectReports/ will be used later to form the later part of the service URL.
2. Get direct reports for the logged in user by invoking getDirectReports REST service operation with
pagination control parameter
Use the following steps to invoke the deployed getPersonInfo REST service operation:
1. Create an HTML file using any text editor with the following content:
This invocation scenario uses path parameter {personId} to obtain the employee ID at run time.
The getPersonInfo service operation is then invoked through HTTP GET request.
<resource path="="getPersonInfo/{personId}/">
<param name="personId" style="template" required="true" type="xsd:int"/>
<method id="getPersonInfo" name="GET">
The path parameter {personId} was annotated earlier in @rep:key_param and can be sent as GET
request URL.
This example does not set Accept header in the GET request. REST service returns response
message is in the default JSON format.
In this example, Taylor, Mr. Steve who has the employee ID 13137 is displayed as the Employee
Name; Bennett, Terrence G (Terry) who is Taylor's manager is displayed as Manager Name.
Use the following steps to invoke the deployed getDirectReports REST service operation:
1. Create an HTML file using any text editor with the following content:
This invocation scenario uses pagination control parameter offset defined in the Javascript to limit
the number of records returned at run time and for pagination when getDirectReports service
operation is invoked through HTTP GET request.
<script language="javascript">
...
xmlhttp.open('GET',url,true);
xmlhttp.setRequestHeader("Accept", "application/xml");
xmlhttp.send();
}
</script>
This example sets Accept header in the GET request. REST service returns response message is in
XML format.
After you entered the username and password and clicked OK, the service returns the first 3 direct
reports (employees) of the user you just entered in the table. Click Next to display the next 3
records retrieved from the direct reports list. Click Previous to display the last 3 records from the
current direct reports list.
Copyright 2008, 2017, Oracle and/or its affiliates. All rights reserved.