Sunteți pe pagina 1din 26

Financial Utilities Service Web Service -

Cook Book

2012 Oracle Corporation. All Rights Reserved.


This document contains the following details about the web service "Financial Utilities Service"

Overview
Details of Logical Business Area(LBA)
List of Web Service Operations
Details of Web Service Operations
List of SDOs related to the Web Service
Details of the SDOs related to the Web Service
List of referenced XSD Files
Details of the referenced XSD files
Accessing WSDL URL
Fusion Service Tester
Web Service Invocation Methods

2012 Oracle Corporation. All Rights Reserved.


Overview

A utility web service for Oracle Fusion Financials that provides external web service operations. For
example, file upload operations to Oracle U niversal Content Management, and service operations to
submit ESS jobs from exte rnal applications.

Internal Name: oracle.apps.financials.commonModules.shared.financialUtilService.FinancialUtilService

Lifecycle: Active

Compatibility: Supported - Backward Compatibility Assured

Files associated with this web service:

File Type File Path File Name


Application module /oracle/apps/financials/commonModules/shared/f FinancialUtilAM.xml
XML inancialUtilService/applicationModule
Service Interface /oracle/apps/financials/commonModules/shared/f FinancialUtilService.java
inancialUtilService
Go to Index

2012 Oracle Corporation. All Rights Reserved.


LBA Details
Shared
Go to Index

2012 Oracle Corporation. All Rights Reserved.


Web Service Operations

uploadFileToUcm
submitESSJobRequest
Go to Index

2012 Oracle Corporation. All Rights Reserved.


Method Details
uploadFileToUcm
Method Name: uploadFileToUcm
Description: The method uploads a file to the UCM server based on the document specified.
Asynch Name: uploadFileToUcmAsync
Asynch CallBack: uploadFileToUcmAsyncResponse

Parameters:

Parameter Description Is Is Type


Name Return Mandatory
document The parameter is used to false Yes oracle.apps.financials.common
pass the list of document Modules.shared.financialUtilSe
details for the document to be rvice.DocumentDetails
uploaded to the UCM server.
return The status of the operation is true java.lang.String
returned.
Go to method listing
submitESSJobRequest
Method Name: submitESSJobRequest
Description: The method submits an ESS job request for the job definition specified.
Asynch Name: submitESSJobRequestAsync
Asynch CallBack: submitESSJobRequestAsyncResponse

Parameters:

Parameter Description Is Is Type


Name Return Mandatory
The parameter is used to false Yes java.lang.String
jobPackageNam pass the job package name
e of the ess job definition to be
submitted.
The parameter is used to false Yes java.lang.String
jobDefinitionNam pass the job definition name
e of the ess job to be
submitted.
paramList The parameter is used to false No java.util.List<java.lang.String>
pass the list of parameters to
invoke the ESS job against.
The order in the list will be the
order of the parameters. If a
given parameter is not
passed, then its
corresponding entry in the list
should be null
return The request id is returned. true java.lang.Long
Go to method listing
Go to Index

2012 Oracle Corporation. All Rights Reserved.


Relationships
Oracle-Service-SDO

The Web service Financial Utilities Service handles the following Service Data Objects(SDO)
o Document Information SDO

Go to Index

2012 Oracle Corporation. All Rights Reserved.


SDO Details
Document Information SDO

The document information that is uploaded to the Oracle Universal Content Management. For example,
filename, content type, content, and author.

SDO Attributes

Name Type Is Key


Content javax.activation.DataHandler false

FileName java.lang.String true

ContentType java.lang.String false

DocumentTitle java.lang.String false

DocumentAuthor java.lang.String false

DocumentSecurityGroup java.lang.String false

DocumentAccount java.lang.String false

DocumentName java.lang.String false

Go to SDO listing
Go to Index

2012 Oracle Corporation. All Rights Reserved.


Referenced XSD Files
Name Path
FinancialUtilService.xsd /oracle/apps/financials/commonModules/shared/financialUtilSe
rvice/
DocumentDetails.xsd /oracle/apps/financials/commonModules/shared/financialUtilSe
rvice/
Go to Index

2012 Oracle Corporation. All Rights Reserved.


XSD Details

FinancialUtilService.xsd

XSD Elements

Name Type
uploadFileToUcm
uploadFileToUcmResponse
uploadFileToUcmAsync
uploadFileToUcmAsyncResponse
submitESSJobRequest
submitESSJobRequestResponse
submitESSJobRequestAsync
submitESSJobRequestAsyncResponse

Go to XSD listing
DocumentDetails.xsd

XSD Elements

Name Type
documentDetails DocumentDetails

Go to XSD listing

Go to Index

2012 Oracle Corporation. All Rights Reserved.


Accessing WSDL URL
To get logical end point,
o Launch OER and login as guest - https://fusionappsoer.oracle.com/oer .
o Search for the service that you need -
Eg: Search String - "Financial Utilities Service",
Type - ADF Service
o Select the service from results section and see the Details tab in the bottom. That will
have service logical end point as below
Service Path: http://<fin_server:PortNumber>/finFunShared/FinancialUtilService
o The part "http://<fin_server:PortNumber>" is dynamic for every environment where as "
/finFunShared/FinancialUtilService" is static for a given service version.
To get physical end point of any given instance,
o Launch ATK home page and login with a functional user.
o Navigate to an application's dashboard/workarea page that belongs to Financial Utilities
Service.
For eg: In case of Financial Util Service navigate to Payables or in case of Purchase
Order Service navigate to Procurement .
o Lets take the Payables Invoice workbench as an example, you will see a URL in the
browser similar to https://<domainname>/payables/faces/InvoiceWorkbench.
The <domainname> might be like https://<pod-name>.<lba>.xxx.oraclecloud.com.
o In this URL,take the "https://<domainname>".
For eg: In case of Payables Invoice workbench URL just take till "payables".
Then append the static context root that we extracted from OER - "
/finFunShared/FinancialUtilService" to it.
o https://<domainname>/finFunShared/FinancialUtilService is the WSDL URL for Financial
Utilities Service.

Go to Index

2012 Oracle Corporation. All Rights Reserved.


Fusion Service Tester

Fusion Service Tester enables users to easily test Fusion Services.

Please find the sample Fusion Service Tester here. It can be invoked by running a jar file. It also has the
sample request for the Upload File to UCM operation.

Steps to Install JAVA on Windows machine

1. Get the latest JDK version from the link


http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html .
2. Install JAVA from the executable.
3. Note down the path of bin directory in the Java installation directory. The default path is
C:\Program Files\Java\jdkx.x.x\bin.
4. Set the System Environment variables.
Right-click on 'My Computer' and select 'Properties'.
Go to Advanced System Settings.
Click Environment Variables.
Set the PATH variable
If PATH is already present, double click it and append the bin path like
";C:\Program Files\Java\jdkx.x.x\bin;".
Else create a New Variable by clicking NEW. Provide variable name as "Path"
and variable value as path of bin directory "C:\Program Files\Java\jdkx.x.x\bin;"
Click Ok.
5. Type " java -version " in the command prompt to test if installation is successful. A successful
installation will return version details.

Steps to Run the Fusion Service Tester Client

1. Navigate to the Client code directory and Use the startFusionServiceTester.sh or


startFusionServiceTester.bat to start the Client.
2. Alternatively you can run the client using the following command:-
java -Djavax.net.ssl.trustStore=default-keystore.jks -jar FusionServiceTester.jar

If you get a SSL handshake error related to invalid certificate path, then additional setup might be needed
to manually add the certificate in the truststore. To do that follow the below instruction

Steps to import a New certificate in the keystore (for IE)

1. Export the certificate from the browser to file using following steps
Open the SSL URL for any of the web service.
Click on the lock icon besides the URL.
Go to the connections tab and certificate information link.
Go to Details -> Copy to File -> Next
Change the encoding to the Base-64 and click Next.
Provide the filename and click finish.

2012 Oracle Corporation. All Rights Reserved.


2. Then in the command prompt type the below command,
keytool -import -trustcacerts -file <filename> -alias <aliasname> -keystore default-keystore.jks -
storepass welcome1

When user runs the jar file, below window will open and user can pass the required parameter values.
1. keytool -import -trustcacerts -file <filename> -alias <aliasname> -keystore default-keystore.jks -
storepass welcome1

Go to Index

2012 Oracle Corporation. All Rights Reserved.


Invoking FinancialUtil Service

This section contains three different ways to invoke FinancialUtilService. The following are the ways to do
the same:

1) Invoking FinancialUtil Service using Web Service Proxy Client.


2) Invoking FinancialUtil Service using BPEL.
3) Invoking FinancialUtil Service using Connections Architecture.

Go to Index

Invoking FinancialUtil Service using Web Service Proxy Client

Objective: Invoking FinancialUtil Service with input parameters and getting


the response back after the invocation using "Web Service Proxy -JAX-WS Style".

Steps:

1. Create a new generic Project and specify the Project Name and Directory.

2. Right click on the project and click on new (CTRL+N).

2012 Oracle Corporation. All Rights Reserved.


3. Choose Web Service Proxy and Click Ok .

4. Click Next.

5. Select JAX-WS Style and click Next.

2012 Oracle Corporation. All Rights Reserved.


6. Enter URL of the WSDL in the fromat :
http://<fin_server:PortNumber>/finFunShared/FinancialUtilService?WSDL.
Deselect Copy WSDL into Project.

7. Click Next.

8. Click Next.

2012 Oracle Corporation. All Rights Reserved.


9. Click Next.
10. Select oracle/wss11_saml_token_with_message_protection_client_policy

11. Click Next

12. Click Finish.

13. Double Click on FinancialUtilServiceSoapHttpPortClient.java which is basically the file to be


edited to invoke the service.

Finally the code will look like this:-

FinancialUtilServiceSoapHttpPortClient.java

import com.sun.xml.ws.api.addressing.AddressingVersion;
import com.sun.xml.ws.api.addressing.WSEndpointReference;
import com.sun.xml.ws.developer.WSBindingProvider;
import com.sun.xml.ws.message.StringHeader;
import java.util.UUID;
import javax.xml.ws.WebServiceRef;
import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;

// !THE CHANGES MADE TO THIS FILE WILL BE DESTROYED IF REGENERATED!


// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (11.1.1.0.0, build 110329.0915.20612)

public class FinancialUtilServiceSoapHttpPortClient {

@WebServiceRef

2012 Oracle Corporation. All Rights Reserved.


private static FinancialUtilService_Service financialUtilService_Service;

private static final AddressingVersion WS_ADDR_VER = AddressingVersion.W3C;

public static void main(String[] args) throws ServiceException {

//setup security feature with OWSM policy


SecurityPolicyFeature[] securityFeature =
new SecurityPolicyFeature[] { new
SecurityPolicyFeature("policy: oracle/wss11_saml_token_with_message_protection_client_policy ") };

financialUtilService_Service = new FinancialUtilService_Service();

FinancialUtilService financialUtilService=
financialUtilService_Service.getFinancialUtilServiceSoapHttpPort(securityFeatur
e);

// Get the request context to set the outgoing addressing properties

WSBindingProvider wsbp = (WSBindingProvider) financialUtilService


WSEndpointReference replyTo = new
WSEndpointReference("http://<fin_server:PortNumber>/finFunShared/FinancialUtilService",WS_ADDR_VER);

String uuid = "uuid:" + UUID.randomUUID();

wsbp.setOutboundHeaders(new
StringHeader(WS_ADDR_VER.messageIDTag,uuid),replyTo.createHeader(WS_ADDR_VER.replyToTag));

// Add Security Headers below if any Authentication is required.

wsbp.getRequestContext().put(WSBindingProvider.USERNAME_PROPERTY,
"<your username>");

wsbp.getRequestContext().put(WSBindingProvider.PASSWORD_PROPERTY,
"<Your Password>");
wsbp.getRequestContext().put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS,"service");
// Provide the location of your keystore(.jks file)
wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_LOCATION, <location of keystore file>);
wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "password" );
wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS" );
wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_ALIAS, "client" );
wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_PASSWORD, "password" );
wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "client" );
wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "password" );

// Add your code to call the desired methods

String variableName =
financialUtilService.uploadFileToUcm(<Enter your DocumentDetails param>);

//Add your custom code to call the desired method with the required input parameters.

String variableName =
financialUtilService.uploadFileToUcmAsync(<Enter your DocumentDetails param>);

//Add your custom code to call the desired method with the required input parameters.

Long variableName =
financialUtilService.submitESSJobRequest(<Enter your String param>, <Enter your String param>, <Enter your
List<String> param>);

2012 Oracle Corporation. All Rights Reserved.


//Add your custom code to call the desired method with the required input parameters.

Long variableName =
financialUtilService.submitESSJobRequestAsync(<Enter your String param>, <Enter your String param>, <Enter
your List<String> param>);

//Add your custom code to call the desired method with the required input parameters.

}
}

Go to Top

Invoking FinancialUtil Service using BPEL.

Objective: Invoking FinancialUtil Service with input parameters and getting


the response back after the invocation using BPEL".

Steps:

1. Create a new SOA project and specify the name as WebServiceInvocationComposite.

2012 Oracle Corporation. All Rights Reserved.


2. Drop Web Service Component from Component Pallete.

3. Enter the WebService name as " FinancialUtilService " and the URL of the WSDL you want to invoke
as

http://<fin_server:PortNumber>/finFunShared/FinancialUtilService?WSDL

4. Drop the BPEL process from the Component Palette and name the BPEL process say
WebServiceInvocationProcess.

5. Wire the BPEL with WebService.

6. Double click on BPEL to open WebServiceInvocationProcess.bpel file. Initially the .bpel file will look like
this.

2012 Oracle Corporation. All Rights Reserved.


7. Drop an invoke activity from component palette and double click on it.

8. Browse for partner link and select " FinancialUtilService ".

9. Select the operation you want to perform . In this case the name of the method will be
" uploadFileToUcm ".

10. In variables click plus icon for both input and output and press ok. This will create two variables to
invoke the webservice.

2012 Oracle Corporation. All Rights Reserved.


11. Drag an assign activity from component palette and put it before the invoke activity.

12. Double click on assign activity. Expand inputvariable and


InvokeWebService_uploadFileToUcm_InputVariable . Wire the input element to the appropriate element
of the InvokeWebService_uploadFileToUcm_InputVariable.

13. Similarly drop an assign activity after InvokeWebService and assign the appropriate element of
InvokeWebService_uploadFileToUcm_OutputVariable to the result element of output variable.

14. Now Right click on the composite and go to deploy and deploy it on a server.

2012 Oracle Corporation. All Rights Reserved.


15. Now test the composite from WebLogic Enterprise Manager and you will get the appropriate
response.

Go to Top

Invoking FinancialUtil Service using Connections Architecture

Objective: Invoking FinancialUtil Service with input parameters and getting


the response back after the invocation using Connections Architecture".

Steps:

1. To invoke a particular webservice ,there should be a entry corresponding to that webservice


in the connections.xml .

The given file can be found at the following location?


fusionapps/<family>/components/<Application_Name>/.adf/META-INF/connections.xml

JDEV users can find the given file by following the below steps.

Application Resources > Descriptors > ADF META-INF > connections.xml

2012 Oracle Corporation. All Rights Reserved.


Now add the following code in connections.xml .

<Reference
name="{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/}FinancialUtilService"
className="oracle.jbo.client.svc.Service" xmlns="">
<Factory className="oracle.jbo.client.svc.ServiceFactory"/>
<RefAddresses>
<StringRefAddr addrType="serviceInterfaceName">
<Contents>oracle.apps.financials.commonModules.shared.financialUtilService.FinancialUtilService</Contents>
</StringRefAddr>
<StringRefAddr addrType="serviceEndpointProvider">
<Contents>SOAP</Contents>
</StringRefAddr>
<StringRefAddr addrType="webServiceConnectionName">
<Contents>FinancialUtilServiceConnection</Contents>
</StringRefAddr>
<StringRefAddr addrType="serviceSchemaName">
<Contents>FinancialUtilService.xsd</Contents>
</StringRefAddr>
<StringRefAddr addrType="serviceSchemaLocation">
<Contents>oracle/apps/financials/commonModules/shared/financialUtilService/</Contents>
</StringRefAddr>
</RefAddresses>
</Reference>
<Reference name="FinancialUtilServiceConnection"
className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl"
credentialStoreKey="FinancialUtilServiceConnection" xmlns="">
<Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
<RefAddresses>
<XmlRefAddr addrType="WebServiceConnection">
<Contents>
<wsconnection description="http://<fin_server:PortNumber>/finFunShared/FinancialUtilService?WSDL"

service="{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/}FinancialUtilService">
<model
name{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/}FinancialUtilService"
xmlns="http://oracle.com/ws/model">
<service
name{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/}FinancialUtilService">
<port name="FinancialUtilServiceSoapHttpPort"
binding="{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/}FinancialUtilServiceSoap
HttpPort">
<policy-references xmlns="http://oracle.com/adf">
<policy-reference category="security" uri="oracle/wss_username_token_client_policy" enabled="true"
id="oracle oracle/wss_username_token_client_policy" xmlns=""/>
</policy-references>
<soap username="transportUserName" password="transportPassword"
addressUrl="http://<fin_server:PortNumber>/finFunShared/FinancialUtilService"

xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>

<operation name="uploadFileToUcm">
<soap

2012 Oracle Corporation. All Rights Reserved.


soapAction="http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/uploadFileToUcm"
xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<output name=""/>
<input name=""/>
</operation>
<operation name="uploadFileToUcmAsync">
<soap
soapAction="http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/uploadFileToUcmAsync
" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<output name=""/>
<input name=""/>
</operation>
<operation name="submitESSJobRequest">
<soap
soapAction="http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/submitESSJobRequest"
xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<output name=""/>
<input name=""/>
</operation>
<operation name="submitESSJobRequestAsync">
<soap
soapAction="http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtilService/submitESSJobRequest
Async" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<output name=""/>
<input name=""/>
</operation>

</port>
</service>
</model>
</wsconnection>
</Contents>
</XmlRefAddr>
<SecureRefAddr addrType="transportPassword"/>
<SecureRefAddr addrType="transportUserName"/>
</RefAddresses>
</Reference>

Now you have an entry corresponding to the webservice you want to invoke.

2. For j2se client (ServiceFactory is executed from a standalone j2se client), we need to make
sure that the following five jar files are added in "classpath & libraries" of your project:
? library "Java EE 1.5"
? library "Oracle XML parser v2"
? library "JAX-WS client"
? library "BC4J Service Client"
? your service's common jar file

2012 Oracle Corporation. All Rights Reserved.


3. Create a new generic project and specify a name.

4. Create a java class and name it as say InvokeWebService and add the following code in the
main method.

InvokeWebService.java

import oracle.jbo.client.svc.ServiceFactory;

public class InvokeWebService {


public InvokeWebService () {
super();
}
public static void main(String[] args) {

FinancialUtilService financialUtilService =

(FinancialUtilService)ServiceFactory.getServiceProxy("{http://xmlns.oracle.com/apps/financials/commonModules/shared/financialUtil
Service/}FinancialUtilService");

String variableName =
financialUtilService.uploadFileToUcm(<Enter your DocumentDetails param>);

//Add your custom code to call the desired method with the required input parameters.

String variableName =
financialUtilService.uploadFileToUcmAsync(<Enter your DocumentDetails param>);

//Add your custom code to call the desired method with the required input parameters.

Long variableName =
financialUtilService.submitESSJobRequest(<Enter your String param>, <Enter your String param>, <Enter your
List<String> param>);

//Add your custom code to call the desired method with the required input parameters.

Long variableName =
financialUtilService.submitESSJobRequestAsync(<Enter your String param>, <Enter your String param>, <Enter your
List<String> param>);

//Add your custom code to call the desired method with the required input parameters.

}
}
Go to Top
Go to Index

2012 Oracle Corporation. All Rights Reserved.