Tuesday, November 18, 2014
Thursday, November 13, 2014
#350 Using API Catalog for harvesting Service Bus APIs
Same modus operandi as in the previous post - except we now us the osbharvester directory.
I had to make some changes to the following files - setenv.bat and HarvesterSettings.xml
BTW. my SB install is part of the JDEV SOA Quickstart environment.
JDEV Quickstart is installed at D:\Work\envs\FMW12c\SOA\jdev
Now, I probably could have done the above more elegantly, but it's late...
I had to make some changes to the following files - setenv.bat and HarvesterSettings.xml
BTW. my SB install is part of the JDEV SOA Quickstart environment.
JDEV Quickstart is installed at D:\Work\envs\FMW12c\SOA\jdev
setenv.bat
@echo off
@rem Common Environment, including JAVA, ANT etc...
set MW_HOME=..\..\..\
call %MW_HOME%\oracle_common\common\bin\commEnv.cmd
echo %MW_HOME%
@rem OSB / ConfigJar Tool Home directories
@rem NiallC changed the following 3 entries
set OSB_HOME=D:\Work\envs\FMW12c\SOA\jdev\osb
set OER_HOME=%MW_HOME%oer
set HARVESTER_HOME=%OER_HOME%\tools\osbharvester
@rem end of NiallC changes
@rem System properties required by OSB
set OSB_OPTS=
set OSB_OPTS= %OSB_OPTS% -Dweblogic.home="%WL_HOME%/server"
set OSB_OPTS= %OSB_OPTS% -Dosb.home="%OSB_HOME%"
set OSB_OPTS= %OSB_OPTS% -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration
set OSB_OPTS= %OSB_OPTS% -Doracle.core.ojdl.logging.config.file="%HARVESTER_HOME%/logging.xml"
set JAVA_OPTS=%JAVA_OPTS% %OSB_OPTS%
set ANT_OPTS=%ANT_OPTS% %OSB_OPTS%
@rem classpath representing OSB
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
set CLASSPATH=%CLASSPATH%;%MW_HOME%\wlserver\server\lib\weblogic.jar
set CLASSPATH=%CLASSPATH%;%MW_HOME%\oracle_common\modules\internal\features\jrf_wlsFmw_oracle.jrf.wls.classpath_12.1.3.jar
@rem NiallC reset the next line
@rem set CLASSPATH=%CLASSPATH%;%MW_HOME%\soa\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar
set CLASSPATH=%CLASSPATH%;D:\Work\envs\FMW12c\SOA\jdev\soa\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar
set CLASSPATH=%CLASSPATH%;%OSB_HOME%\lib\servicebus.jar
@rem classpath for OER Harvester
set CLASSPATH=%CLASSPATH%;%HARVESTER_HOME%\client.harvester.jar
set CLASSPATH=%CLASSPATH%;%HARVESTER_HOME%\client.harvester-osb.jar
@rem ANT classpath
set LOCALCLASSPATH=%CLASSPATH%
Now, I probably could have done the above more elegantly, but it's late...
HarvesterSettings.xml
I run the cmd as follows -
D:\Work\envs\APICatalog\WLS\oer\tools\osbharvester>
osb-harvest -remote_url http://ncommisk-de.de.oracle.com:7101 -remote_username weblogic -remote_server_type OSB
I then check the result in OAC - here is my SB (REST) API
Here is the definition in em -
I now harvest another SB project -
Here are the APIS in OAC -
Here are the details of one of the services -
#349 Using the API Catalog for harvesting SOA service APIs
Now to the usage of the catalog itself.
It leverages the OER concept of the harvester and has the concept of Departments for User management.
The Admin function - I have clicked on the Admin link -
I create a new department -
I create a new user -
I give myself the roles curator and developer.
Now what can they do?
The descriptions are taken from the official ORCL docs.
It leverages the OER concept of the harvester and has the concept of Departments for User management.
The Admin function - I have clicked on the Admin link -
I create a new department -
I create a new user -
I give myself the roles curator and developer.
Now what can they do?
The descriptions are taken from the official ORCL docs.
developer -
Users with the developer role have the ability to search OAC for published APIs from the OAC console or using the Oracle Enterprise Repository JDeveloper plug-in. The developer can examine the API metadata to better understand the API. The developer also has the ability to declare interest in the API and submit ratings and reviews for an API.
curator -
In addition to the capabilities available to the developer role, users with the curator role can run the harvester to create new API assets in OAC. After API assets have been created, curators edit them to update their metadata. The curator also has the ability to publish an API, which makes the API available for discovery by developers.
admin -
In addition to the capabilities available to the curator and the developer roles, users with the admin role have access to the Adminpage in OAC. From this page users with this role can administer the infrastructure of OAC by editing system settings, creating new users, creating new departments, managing sessions, and using the import/export tool. Users with this role can also configure the security features included with OAC.
Now I harvest some assets.
Again, to quote the docs -
The first activity in the asset lifecycle is to harvest APIs into OAC. The curator uses the harvester to populate OAC with API assets from SOA Suite and Service Bus or other deployed services. The harvester can be run from the command line or be integrated into the build process to automatically do the harvest at build time. The harvester creates API assets in a "Draft" state, meaning they are not discoverable by developers searching OAC.
I begin by harvesting my SOA assets -
here they are, listed in em -
To begin with, I will harvest the GetOrder composite.
Steps
1. Edit HarvesterSettings.xml
2. Run encrypt.bat on this file to encrypt the password.
Mine is already run, in the screenshot above.
3. Open a CMD window in the /harvester directory
4. Set JAVa_HOME to point to your JDK.
5. run setenv.bat
6. run the harvester e.g.
D:\Work\envs\APICatalog\WLS\oer\tools\harvester>harvest.bat -remote_url http://n
commisk-de.de.oracle.com:7101 -remote_username weblogic -remote_server_type SOAS
uite -remote_project GetOrder_rev1.0 -soa_partition default
Note: I use my machine name and not localhost.
Review in OAC -
I check out the details -
I can set the status to published -
and add a nice icon.
I log in to OAC as NiallC and see the asset.
Simple, yet effective!
#348 Installing API Catalog
Very simple -
download the required files from OTN.
Apply the patch using the OPatch from /WLS.
Apply the patch using the OPatch from /WLS.
rcu can be found in the /oracle_common/bin directory.
Set JAVA_HOME, if not already set.
then run rcu.
Click Ignore
Nearly there... here is the summary.
Click Create
Create a new domain
Set the password.
accept the defaults on the next screens.
Then click Create
start oac_server1 from the cmdline or from the console(after starting nodeManager)
You will be prompted to change the password.
download the required files from OTN.
1. Install XEDB
2. Install WebLogic Server. I installed to d:\work\envs\APICatalog\WLS
3. Install OER (API Catalog is contained within) - point to WLS install
java -jar oer_generic.jar
4. Download and apply RCU patch for OER 12c.
Apply the patch using the OPatch from /WLS.
5. Download and apply patch 18718889 for WebLogic
Apply the patch using the OPatch from /WLS.
6. Run RCU
Ensure your XEDB is up and running.rcu can be found in the /oracle_common/bin directory.
Set JAVA_HOME, if not already set.
then run rcu.
Click Ignore
Nearly there... here is the summary.
Click Create
7. Configure the WebLogic domain
Run config.cmd
Create a new domain
Set the password.
accept the defaults on the next screens.
Then click Create
8. Start the OAC server
Login to the WebLogic console
start oac_server1 from the cmdline or from the console(after starting nodeManager)
9. Login to the OAC Server
http://localhost:8111/oac
login as admin/weblogic1
You will be prompted to change the password.
Simple Stuff!
Subscribe to:
Posts (Atom)