0% found this document useful (0 votes)
121 views33 pages

Using File Based Loader For Fusion Product Hub

Using File Based Loader for Fusion Product Hub

Uploaded by

NoExpiry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views33 pages

Using File Based Loader For Fusion Product Hub

Using File Based Loader for Fusion Product Hub

Uploaded by

NoExpiry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Cloud Fusion Middleware Fusion Applications About Log in

Using File Based Loader for Fusion Product Hub


March 6, 2015 maintained by Ulrich Janke Leave a Comment Originally Written By: Ulrich Janke

Using File Based Loader for Fusion Product Hub


Introduction
File Based Loaders (FBL) offer a broad bandwidth of varieties to import batch data manually by user interaction or automat
locally scheduled processes using existing API’s and Web Services. This article will highlight the Fusion Product Hub speci
capabilities to import item data in a batch by using FBL. Another and more generic article about File Based Loaders can be
here.

The current FBL solution for Fusion Product Hub is covering the following customer scenarios:
Manual (UI based) upload and import of item data to Fusion Product Cloud or Fusion Product Hub on-premise instances
Automated loader and import processes for item data to Fusion Product Cloud or Fusion Product Hub on-premise instanc

This article will describe a technical implementation that can be used with Fusion Product Hub and on-premise installations
same way. It will also cover some basic and necessary functional setup aspects. Please note that item import via FBL does
replace the other Product Hub solutions for data import such as item batch imports via Fusion Desktop Integration. It can ra
be seen as an additional offering for item imports.

Release Notes
Please notice the following changes for this article since initial publishing in March 2015:

The section below called Optional: Checklist Security Setup in UCM (on-premise only) became obsolete since Relea
as the Entitlement Server APM is not longer part of the Fusion Apps tech stack and the described APM Policies are not
existent anymore.
The information for UCM Security Setup below have changed since R12 (i.e. Account and Security Group in UCM) as
were related to APM roles and are not relevant anymore.

Main Article
File Based Loader for Fusion Product Hub is using standard technologies and components from the Fusion Apps technolog

1 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

stack on the backend – both in the cloud and on-premise. It’s not necessary to install extra components or products in addit
Fusion Product Hub.

Figure below visualizes the available product data load options for manual (user interaction trough portal or desktop integra
and automatic (Web Services, API’s) scenarios. This blog will explain how to use the various features.
Social Facebook Arch Beat Twitter OTN Group FMW Group
Copyright Information Privacy at Oracle Terms of use About the A-Team

All content and s/w code on this site are offered without any warranty, or promise of operational quality or functionality.

Customers can use a thin technology footprint in their client environment to use the capabilities of FBL for Fusion Product H
The following runtime components and tools are sufficient to create a connection to FBL for uploading item data and trigger
scheduling jobs:
Java Development Kit (JDK) 1.8.x
JDeveloper 12c
WebCenter Content Document Transfer Utility for Oracle Fusion Applications (free of charge utility available on Oracle
Technology Network)

Especially for cloud customers this footprint eliminates the necessity to install additional server components in their data ce
while Fusion Apps on-premise or Fusion Middleware customers can leverage their existing infrastructure to run the FBL rela
client programs and tools.

FBL can be seen as an additional integration point with an option to provide item loader data in Fusion Content Server (UC
further import processing. These tasks can be done as manual interactions (occasional item loads) or alternately as an
automated task via scripts and API’s. Details will be explained in following sections:

2 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Common functional setup for successful item imports


Loading data to Fusion Content Server
Initiating a item load scheduled job

Note: Other item import capabilities using Desktop Integration are co-existing with the current FBL offering and remain anot
import offering for on-premise customers.

Part I: Functional Setup for Fusion Product Hub Item Loader


This blog will not cover all aspects of functional setup steps. Instead we’ll focus just on some basic introduction about a fun
setup which is generic in terms of being valid for performing any other item definitions as well. Fusion Product Hub offers a
capabilities for definition of custom item structure as required by customers needs.

In a first step, after receiving information describing the item structure and validations, an authorized user will create custom
attributes by running the setup task as shown in screenshot above. This step is op
and needs to be carried out only if attributes other than those available out of the box (operational attributes) in Product Hub
required.

Attribute Groups consist of attributes, which describe a specific feature of an item. Attribute values can be validated by valu

3 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

or more complex, coded validations. All these definitions are stored in an internal metadata repository called Extensible Fle
(EFF).

Once these Attributes and Attribute Groups have been defined, they can be assigned to Item Classes as shown below. New
items being loaded via FBL belong to dedicated item classes after import.

Before running an item import we must create a mapping between import item structure and the equivalent item class in Fu
Product Hub. Once defined, we must save the Import Map and will refer to it later in the loader process.

4 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Screenshot below shows a sample mapping in an overview page. Process of mapping consists of assigning columns in CS
structure to attributes defined per item.

The import structure for mapping is derived from a sample CSV file being loaded to Fusion Product Hub. The first line (head
a CSV file describes the columns in import structure that has to be mapped to target structure. This can be done via UI by
dragging target fields to source fields.

5 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Last but not least an Item Import will run in the context of a Spoke System in Fusion Product Hub. If not already existing, it m
be created and assigned to an Item Organization. Every import job started via FBL must refer to a spoke system.

The functional setup for FBL Item Import as shown above doesn’t differ from any other item import like Desktop Integration.
is usually a one-time activity per import structure. The functional setup is complete after finishing the previous tasks.

Part II: Loading Product Data to Fusion Content Server


FBL leveraged the Universal Content Management (UCM) server coming with Fusion Product Hub for storing import files. It
usually available under the following URL:

Customers have a choice to either use the FBL UI for occasional data loads or to setup a machine-to-machine communicat
instead. This chapter will give an overview about folder structures, basic security structures and given functionality in UCM
loader files into a staging area for further processing for both variants: the manual and the automated loader tasks.

Manual Steps
Login page to Fusion Content Server is available via URL above.

6 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

In demo system we’re using a Fusion Product Hub identity named .

This user is assigned to the following roles as shown below. By using these roles we ensure that all required permis
are given to run File Based Loader.

File Based Loader requires two files being available in UCM:


Data File in CSV format containing the item information
Manifest file defining the used import mapping (see above) and the path/name for file containing item data

Both files must be existent and accessible in Fusion Content Server before triggering the loader job. Screenshot below sho
sample of item data in CSV format.

7 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

As stated above a manifest file describes the file and import mapping information for a dedicated item load as shown below

Staging area for Fusion Product Hub is predefined as .

Via menu new files must be uploaded into that folder. The screenshot below provides further details. The field
must be filled with the correct values for accessibility permissions – in case of this FBL for Fusion Product Hub sample we u
This account is a seeded value and it can be used for this purpose. Users can setup their own accoun
use them alternately. It’s also possible to use Security Groups instead of Accounts when using UI based file upload. More d
about security mechanisms are explained in the next section below.

8 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Once all files were uploaded – either manually or automatically via scripts – the required files must reside in UCM folder be
triggering the item load job. The screenshot below shows a sample.

When double checking properties for uploaded files the screenshot below shows a typical setup (meaning for
to be explained further down in this document):
Folder: /Contribution Folders/PIM
Security Group: FAImportExport
Account: scm$/item$/import$

As soon as these files have been uploaded and correct data has been provisioned the UCM part of FBL is done and we can
proceed to do the next step.

Optional: Checklist Security Setup in UCM (on-premise only)


Normally there are no requirements to modify or extend the UCM security setup. The security features described above (i.e
, etc.) are supposed to be existent. However in case of troubleshooting it might be good having a qu
checklist about UCM security options as needed by FBL for Fusion Product Hub. A full documentation can be found on prod
documentation site here.

The following relationship between Users, Roles, Policies and Resources exist:

9 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

UCM resources like Security Groups and Accounts define access to various folders and files
These resources are grouped in APM Policies
APM Policies are assigned to Application Roles
Application Roles are assigned to Fusion Product Hub Users

The best option to check security setup is by using a privileged user like . Obviously that won’t work in Fusion Prod
Cloud. Its recommended to submit a Service Request in case of doubt that security options might not be set correctly if usin
cloud services.

After login as a privileged user open the sub-page. In the right window pane a list of appears
activation of -> (see below).

The applet shows the user we’re using in this sample as the external user in our sample. It means the u
registered in Fusion Identity Management. Only a few UCM built-in users are marked as local. Usually it’s neither necessar
recommended to touch any of these entries via this applet.

10 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

The screenshot below shows more details of our sample user.

Furthermore it might be useful to show where the UCM Account (see usage in section above) is define
will improve the understanding of underlying security concepts.

Entries can be found via the Authorization and Policy Management (APM) page in Fusion Product Hub via a link like this:

You must use privileged user credentials like for a successful login to APM.

Once logged in we can search for UCM Accounting details as shown below.

Search for

11 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Next step is to search for resources starting with in the pages s shown below.

Open detail page for with the results as shown below and click the button .

In Policies overview page we find the attached policies.

Opening these policies will show the details about document permissions per resource as defined for Item Import in Fusion
Content Server.

12 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Programmatic Interface for Item Upload to Fusion Content Server


As an alternative to manual uploads of Item data we can use a publicly available toolset called
. It can be downloaded from OTN as shown below.

13 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

This toolset provides some Java programs to be used from command line interface. Such an interface is useful when runnin
periodical jobs in customer environments to upload new or changed item data without human interaction.

A processing pipeline could look like this:


Extract item data from a local system and transform them into a CSV format as expected by Fusion Product Hub
Put the file to a staging area
Create a manifest file or reuse an existing manifest file in case file names remain the same on Fusion Content Server
Run the command line utility to upload file(s)
Initiate further processing to load Item Data via calling a Webservice to run an Import Job.

Recently some related articles have been published on Fusion Apps Developer Relations Blog like this post. Please refe
those sources if you want to learn more about the tool usage.

In this section we will cover the tool usage as required for Fusion Product Hub item load.

The transfer utility provides two different interfaces to connect to Fusion Content Server:
The RIDC-based transfer utility as a feature-set Java library that encapsulates a proprietary protocol ( ) to Fusion Con
Server via HTTPS.
A generic soap-based transfer utility using the Oracle JRF supporting libraries for JAX/WS over HTTPS to communicate
the Fusion Content Server.

After download and extraction of transfer utility two sub-directories will exist: and . Details about the specific
command line parameters and connection information can be found below.

In addition to these both sub-directories a file will be extracted


comprehensive documentation about tool usage, troubleshooting and additional options.

Upload via the RIDC Java library


Using a RIDC connection might be the preferred option for those customers who have no FMW products in place. The Java
library (existing in in sub-directory after extraction) can be used standalone and doesn’t
require any other libraries in addition to a JDK with a minimum release of 1.7 (for JRockit 1.6).

Connection information can be located in a configuration file with content like this:

1 url=https://<fusion_product_hub_server>:<port>/cs/idcplg
2 username=<IntegrationUser>
3 password=<Password>
4 policy=oracle/wss_username_token_client_policy

14 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

In production environments it’s strongly recommended to avoid saving passwords in clear text in configuration files like this.
Putting them into wallets and reading values from there would be the preferred choice.

A command line running the document upload via RIDC would look like this (“\” used for same line where columns too long)

1 ${JAVA_HOME}/bin/java \
2 -jar ./oracle.ucm.fa_client_11.1.1.jar UploadTool \
3 --propertiesFile=./connection.properties \
4 --primaryFile=ItemManifest.csv \
5 --dDocTitle="ItemManifest.csv" --k0=dCollectionPath \
6 --v0="/Contribution Folders/PIM/" \
7 -dDocAccount="/scm$/item$/import$"

A successful execution will result in an output like this:

1 Oracle WebCenter Content Document Transfer Utility


2 Oracle Fusion Applications
3 Copyright (c) 2013-2014, Oracle. All rights reserved.
4 * Custom metdata set: "dCollectionPath"="/Contribution Folders/PIM/".
5 Performing upload (CHECKIN_UNIVERSAL) ...
6 Upload successful.
7 [dID=76 | dDocName=UCMFA000076]

The uploaded document from the example above resides in the Fusion Content Server with a global document id
internal document name . For further processing we’d rather locate it by its logical file information
.

Using RIDC connection would be apparently a first choice for cloud customers who are not using any Oracle Fusion Middle
runtime environment. However it is possible for Fusion Product Hub on-premise customers to use this connection type too.

Upload via the generic Java library


The generic approach will connect to a WebService in Fusion Content Server to perform a file upload. After extraction in fol
a Java library can be found. For this type of connection the
will point to a different URL as shown below:

1 url=https://<fusion_product_hub_server>:<port>/idcws
2 username=<IntegrationUser>
3 password=<Password>
4 policy=oracle/wss_username_token_client_policy

Its Important to mention that the tool can’t run standalone, as we must add an additional library from a Weblogic Server run
directory: . This can be found in WLS directory . No other libraries are
required to be added to the classpath as the remaining Oracle JRF Web Service are referred from .

The command line using the generic Java library would look like this:

1 ${JAVA_HOME}/bin/java -classpath \
2 <WLS_HOME>/oracle_common/modules/oracle.jrf_11.1.1/jrf-client.jar:./oracle.ucm.fa_genericclient_11.1.
3 oracle.ucm.idcws.client.UploadTool \
4 -propertiesFile=./connection.properties \
5 --primaryFile=/home/oracle/CASE_1-CsvMap.csv \
6 --dDocTitle="Product Item Import 0001" \
7 --k0=dCollectionPath --v0="/Contribution Folders/PIM/" \
8 -dDocAccount="/scm$/item$/import$"

Output looks identical like the RIDC version:

1 Oracle WebCenter Content Document Transfer Utility

15 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

2 Oracle Fusion Applications


3 Copyright (c) 2013-2014, Oracle. All rights reserved.
4 * Custom metdata set: "dCollectionPath"="/Contribution Folders/PIM/".
5 Performing upload (CHECKIN_UNIVERSAL) ...
6 Upload successful.
7 [dID=77 | dDocName=UCMFA000077]

As mentioned above using this connection type requires a fully installed Weblogic runtime environment and uses a standar
WebService interface.

Logging option
In order to adjust the level of logging information, the log level can be controlled through a properties file such as
that can be added to the runtime Java call by option

1 -Djava.util.logging.config.file=./logging.properties

The content of this file could look like this:

1 handlers=java.util.logging.ConsoleHandler
2 .level=FINEST
3 java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
4 java.util.logging.ConsoleHandler.level=FINEST
5 oracle.j2ee.level=FINEST

As this is a standard Java feature the full list of values looks as follows:
SEVERE (highest value – least logging)
WARNING
INFO
CONFIG
FINE
FINER
FINEST (lowest value – most logging)

Using the logging features might help in cases where content transfer utility runs into issues with the connections and/or the
upload of files.

Optional: Managing SSL Self-Signed Certificates


It’s strongly recommended to use the HTTPS protocol when connecting to Fusion Content Server despite the fact that plain
HTTP connections would technically work as well. In scenarios using Fusion Product Cloud the server certificates are signe
well-known authorities (trust centers), who’s root certificates are normally part of JDK or browser distributions and no specia
certificate handling is required.

When using Fusion Product Hub on-premise there might be situations where self-signed certificates are used for SSL. Whe
running Java programs these certificates must be imported into the clients certificate store. Here is a short explanation how
manage this:

The connection to a server with self-signed certificate will produce a warning in web browsers. Its possible to take a closer l
the certificate details like shown in a Firefox screenshot below:
Warning page appears stating that a connection can’t be trusted
Click on “I understand the risks”

16 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Click on “Add exception …”


Click on “View” and as a result the certificate details appear like shown below

Usually unknown certificates shouldn’t be trusted, but in this special case we are the issuers and make an exception.

We can download the certificate via the following access path in Firefox:
Click on tab “Details” as shown in screenshot above
Click on “Export … ” as shown in screenshot below
In File Save dialog choose “X.509 Certificate (DER)”
Save the file in a folder

17 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Once saved, we must import this certificate into the certificate store of Java runtime which we use to run the content transfe
utility. The command line looks like this:

1 ${JAVA_HOME}/bin/keytool –importcert \
2 –alias <name_referring_to_ssl_server> \
3 -keystore ${JAVA_HOME}/jre/lib/security/cacerts \
4 –file <path_to_der_certificate>

When asked for a password and it has never been changed the default value would be “changeit”.

Part III: Initiating the Item Data Load


In the previous section the provisioning of files to Fusion Content Server has been explained. The final step to import these
into Fusion Product Hub is running the loader and import job. This job runs seamlessly and the following jobs are included:
Transfer item data from the file in Fusion Content Server to Item Interface Tables
Run a batch import from Item Interface Tables to Item tables

Step 2 above is identical to Item Batch Import as existent in Fusion Product Hub for a while including exception handling an

18 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

status reporting.

Customers have an option to initiate the scheduled job (occasional triggering) via UI or to embrace it by scripts for automate
periodical runs.

Manual Item Load via Fusion Product Hub UI


Initiating a manual item load is pretty straightforward, as users just have to follow the standard dialog to trigger a job. For th
purpose use the menu entry in Fusion Product Hub Navigator.

Search for a job called as shown below.

Provide parameters as required:


Manifest File Path: file location of the manifest file as uploaded to Fusion Content Server previously
Assigned Spoke System: Spoke system as defined in the functional setup previously (see section I)

Once the job parameters have been provided the job execution can be submitted for immediate execution or scheduled for
later time.

19 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

The execution status of jobs can be monitored via the same UI as shown below. Once finished the items are supposed to b
transferred from CSV file into the system and can be found in the standard Fusion Product Hub UI for further processing.

Programmatic execution of the loader job from command line


Similar as for uploading files into Fusion Content Server the triggering of loader jobs can be initiated by Java programs. For
purpose it’s recommended to use that can be downloaded from OTN as shown below.

20 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

It’s not necessary to download more technology products to run the programmatic interface for job scheduling.

Create WebService Client to initiate a scheduling job


Technically the job scheduler can be accessed via an existing WebService interface. Oracle JDeveloper 12c provides a gre
offering to generate the WebService accessory code via a coding wizard.

The series of screenshots below will document the step-by-step procedure to generate the Java code. Once done, we have
skeleton of Java code and configuration files that require some minor extensions in order to execute the web service.

As a very first step create a Java application with a custom project. Then choose
…” and “Gallery …”.

21 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

As shown in screenshots below we must provide the information for the WebService we intend to invoke in our code. For Ite
Loader it has the following format:

22 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Once provided click and the wizard will start determining the web service configuration by introspecting the provided w
service WSDL.

As shown in screenshot below there is a choice to enter a custom root package for the generated WebService client code.
Default code will use a package name like this:

In most cases customers want to reflect their own packaging naming conventions and this screen is the location where to
configure it.

23 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

In next step, as shown screenshot below, it is not necessary to change any information and user can enter .

The next dialog will give users a choice to configure the client using a synchronous or asynchronous method. Scheduling a
a synchronous activity and therefore its not required to generate asynchronous Java methods.

24 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

After reading and analyzing the web service a WSM policy


has been found on the server side. The code gen
uses the corresponding client policy to fulfill the se
requirements. This value must be accepted, as the communication between client and server will fail otherwise.

On the next dialog screen no changes are required and the user can press .

25 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Last screenshot of this code generation dialog will show a summary of methods being generated, as they will fit with the me
found in the web service wsdl. After clicking finish the code generation starts and might take up to one or two minutes.

26 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

The development environment after finishing code generation will have a look like shown below in screenshot.

This code generation helps saving a tremendous amount of time if programming manually. Its worth to mention, that some p
of the generated code are under control of JDeveloper and might be overwritten in case of some configuration changes hap
Developers must be careful to add their own code in sections where foreseen and indicated in the code.

The generate code doesn’t provide any details about


Authentication by providing credential
Message encryption as required by the WSM policy
Web service operations to be initiated by this Java code – here Java method for web service
operation
Parameters to be passed to these operation calls

All the additions above are manual tasks to be performed by programmers.

Below is a piece of Java code that shows a working example kept simple for better readability. For a production use we
recommend the following improvements:
Put details for keystore etc in config files
Same for username
Store passwords in a wallet
Important: as mentioned the code is under control of a code generator. To avoid unintentionally code changes its strongly
recommended to create an own class by copy and paste from generated class

27 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Generated and modified Java File

1 package wsclient.mycompany.com;
2
3 import com.sun.xml.ws.developer.WSBindingProvider;
4 import java.util.ArrayList;
5 import java.util.List;
6 import java.util.Map;
7
8 import oracle.webservices.ClientConstants;
9
10 import weblogic.wsee.jws.jaxws.owsm.SecurityPoliciesFeature;
11
12 // This source file is generated by Oracle tools.
13 // Contents may be subject to change.
14 // For reporting problems, use the following:
15 // Generated by Oracle JDeveloper 12c 12.1.3.0.0.1008
16 public class FinancialUtilServiceSoapHttpPortClient {
17 public static void main(String[] args) {
18 FinancialUtilService_Service financialUtilService_Service =
19 new FinancialUtilService_Service();
20
21 // Configure security feature
22 SecurityPoliciesFeature securityFeatures =
23 new SecurityPoliciesFeature(new String[] {
24 "oracle/wss11_username_token_with_message_protection_client_policy"
25 });
26 FinancialUtilService financialUtilService =
27 financialUtilService_Service.getFinancialUtilServiceSoapHttpPort(
28 securityFeatures);
29 // Add your code to call the desired methods.
30 WSBindingProvider wsbp = (WSBindingProvider) financialUtilService;
31 Map<String, Object> reqCon = wsbp.getRequestContext();
32
33 reqCon.put(WSBindingProvider.USERNAME_PROPERTY, "IntegrationUser");
34 reqCon.put(WSBindingProvider.PASSWORD_PROPERTY, "Password");
35
36 reqCon.put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS");
37 reqCon.put(ClientConstants.WSSEC_KEYSTORE_LOCATION,
38 "/home/oracle/FusionClient.jks");
39 reqCon.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "Welcome1");
40 reqCon.put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "mykey");
41 reqCon.put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "Welcome1");
42 reqCon.put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS, "mykeys");
43
44 Long jobID = startEssJob(financialUtilService);
45
46 System.out.println("Item Data Import Job started with ID: " +
47 jobID.toString());
48 }
49
50 private static Long startEssJob(FinancialUtilService fus) {
51 Long essRequestId = new Long(-1);
52
53 try {
54 List<String> paramList = new ArrayList<String>();
55 // UCM folder and file name
56 paramList.add("/Contribution Folders/PIM/ProductLoad.csv");
57 // Spoke System Code
58 paramList.add("PIMDH");
59 // Product Upload - static value here
60 paramList.add("true");
61 // Product Hub Portal Flow
62 paramList.add("false");
63 essRequestId = fus.submitESSJobRequest(
64 "/oracle/apps/ess/scm/productHub/itemImport/",

28 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

65 "ExtProductUploadSchedulingJobDef", paramList);
66 }
67 catch (ServiceException e) {
68 e.printStackTrace();
69 System.exit(1);
70 }
71
72 return essRequestId;
73 }
74 }

Running this Java program from command line doesn’t require any additional libraries except those coming with a JDevelop
installation and a standard JDK.

Its recommended to package all files in project into a JAR file via a Deployment Profile. Once done, a sample call for this
WebService client would look as follows:

1 clientJar=<project_dir>/deploy/FinancialUtilService-Client.jar
2 jdevDir=<jdev12c_install_dir>
3 modulesDir=${jdevDir}/oracle_common/modules
4
5 ${JAVA_HOME}/java \
6 -server \
7 -Djava.endorsed.dirs=${jdevDir}/oracle_common/modules/endorsed \
8 -classpath ${clientJar}:\
9 ${javaDir}/wlserver/server/lib/weblogic.jar:\
10 ${modulesDir}/oracle.jrf_12.1.3/jrf.jar:\
11 ${modulesDir}/ oracle.toplink_12.1.3/eclipselink.jar:\
12 ${modulesDir}/ oracle.toplink_12.1.3/org.eclipse.persistence.nosql.jar:\
13 ${modulesDir}/ oracle.toplink_12.1.3/org.eclipse.persistence.oracle.nosql.jar:\
14 ${jdevDir}/wlserver/modules/com.bea.core.antlr.runtime_2.0.0.0_3-2.jar:\
15 ${modulesDir}/javax.persistence_2.0.jar:\
16 ${modulesDir}/com.oracle.webservices.fmw.wsclient-impl_12.1.3.jar:\
17 ${modulesDir}/com.oracle.webservices.fmw.jrf-ws-api_12.1.3.jar \
18 wsclient.mycompany.com.FinancialUtilServiceSoapHttpPortClient

Output of this call will be the Job ID of the scheduled item loader job. The monitoring of job progress can be done via the
application UI. There are other web services that can be used for checking job status but their explanation is subject to a fu
blog post.

Managing WS Security
As mentioned earlier in this blog the web service policy to run a scheduler job is
. For our Java client it means that two core require
must be satisfied and have been shown in code sample above:
Passing username/password (here: IntegrationUser/Password)
Encrypt the message content

For encryption we must use the public key of web service as provided inside the WSDL. An example can be seen in the
screenshot below.

29 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

The following steps are required to create an entry in the client side Java Key Store for message encryption:
Save the certificate from the WSDL in a certificate file in .pem or .der format
Import the certificate to an existing key store or create a new key store by importing the certificate
Refer to the certificate entries for message encryption as shown above in the sample class.

Open the WSDL in a web browser and search for XML tag . The content must be copied and pasted in
text file as shown below between a line and (sample data as copied from our te
case):

1 -----BEGIN CERTIFICATE-----
2 MIIB+zCCAWSgAwIBAgIEUzRQ0zANBgkqhkiG9w0BAQUFADBCMRMwEQYKCZImiZPyLGQBGRYDY29tMRkwFwYKCZImiZPyLGQBGRYJb
3 TMBEGCgmSJomT8ixkARkWA2NvbTEZMBcGCgmSJomT8ixkARkWCW15Y29tcGFueTEQMA4GA1UEAxMHc2VydmljZTCBnzANBgkqhkiG
4 0+3yjHR/OCpxHERwtBk3Q4jjLVv3nINwKmt/ELnMAm+pa4pAK3wXEzopoxM5phQPp2Mn/iLLNp1OfRI8yzRGowi9K71JcuDhlWJCG
5 nCWLFobNpb9avSw79nEp4BS42XGaOSrfXA2j+/9mY9k9fUxVV+yP7AeKDKwDMoLQ33Yoi0B2t/0LkUDkYEa3xlluLAavrFvJfxSZH
6 -----END CERTIFICATE-----

Save the file under a name like and create an entry or a new Java keystore file as follow

1 ${JAVA_HOME}/bin/keytool –importcert \
2 –alias <alias_as_referred_in_Java_code > \
3 -keystore <my_local_client_trust_store> \
4 –file <path_to_der_certificate_above>

If the keystore doesn’t exist it will be created including new passwords ( in Java code sample above). If the files e
we must provide the keystore passwords in order to be able to create the entry.

Once created, the key store will contain an entry like this:

1 $ ${JAVA_HOME}/bin/keytool -v -list -keystore <my_local_client_trust_store>


2 Enter keystore password:
3
4 Keystore type: JKS
5 Keystore provider: SUN
6
7 Your keystore contains 1 entry
8
9 Alias name: mykeys

30 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

10 Creation date: Feb 24, 2015


11 Entry type: trustedCertEntry
12
13 Owner: CN=fahost2.mycompany.com, OU=defaultOrganizationUnit, O=defaultOrganization, C=US
14 Issuer: CN=fahost2.mycompany.com, OU=defaultOrganizationUnit, O=defaultOrganization, C=US
15 Serial number: 5397498d
16 Valid from: Tue Jun 10 20:08:13 CEST 2014 until: Sat Jun 10 20:08:13 CEST 2017
17 Certificate fingerprints:
18 MD5: 6D:BA:94:CE:84:E6:C0:A3:CA:A3:F1:8A:39:1E:E9:2E
19 SHA1: C7:3D:62:42:D8:E7:A0:DB:57:93:40:32:A8:54:E0:57:60:F0:8B:FD
20 SHA256: 40:D0:C3:81:CF:5D:6B:61:95:23:27:24:83:8D:1A:34:9F:31:C7:E5:15:BE:49:44:81:E6:D9:34:0A:
21 Signature algorithm name: SHA1withRSA
22 Version: 3
23
24
25 *******************************************
26 *******************************************

Summary
In this article we provided a 360° view on tasks and activities for automating the use of File Based Loader for Fusion Produ
Hub. Everything discussed in this article applies to both cloud and on-premise deployments of Fusion Product Hub the sam
way.

Link collection in order of appearance in this blog:


Related File Based Loaders Blog
UCM Security Doc
Download Webcenter Transfer Utility
Fusion Apps Developer Relations Blog
Related Blog Post about Webcenter Transfer Utility

All site content is the property of Oracle Corp. Redistribution not allowed without written permission

Like 2 Tweet Share 12

filed under: cloud, fusion applications, integrate and co-exist, product value chain, saas, supply chain management
webcenter content tagged with: fbl, file based loader, fusion product hub, item import, item load, java ws client
load, ucm, web services

Add Your Comment


You must be logged in to post a comment.

31 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Search this website … Search

Search Additional Oracle Sites

Share
12

Categories
Categories

Recent Posts
Setup Oracle API Gateway on OCI-
Classic in Oracle Public Cloud

Extending analytics for Integration cloud


using Elastic stack.

Creating a Connection in Data


Visualization Desktop to the Exadata
Express Cloud Service – Beta

Connecting an Oracle Analytics Cloud


RPD to the Exadata Express Cloud
Service – Beta

Creating a Connection in Oracle Analytics


Cloud to the Exadata Express Cloud
Service – Beta

32 of 33 15/03/2018, 10:38
Using File Based Loader for Fusion Product Hub http://www.ateam-oracle.com/using-file-based-loader-for-fusion-product...

Creating a Connection in Oracle Analytics


Cloud to the Autonomous Data
Warehouse Cloud – Beta

Connecting an Oracle Analytics Cloud


RPD to the Autonomous Data Warehouse
Cloud – Beta

Archives
Archives

33 of 33 15/03/2018, 10:38

You might also like