Thursday, September 16, 2010

Oracle Service Registry and OSB11g

Simple scenario - customer has installed OSB 11g and now wants to leverage OSR.

So the pre-requisites are fulfilled -

Oracle DB e.g. XE already installed
OSB 11g already installed
-- WLS - oepe111150_wls1033_win32.exe
-- OSB - ofm_osb_generic_11.1.1.3.0_disk1_1of1.zip




OSR will be installed in a separate WLS domain.

If you need to install in the same domain then please refer to -
http://blogs.oracle.com/governance/2010/05/oracle_service_registry_11gr1.html

Install OSR


















Point to XE JDBC driver















Post Install Configuration




Create a new WLS domain for OSR


















Test

Test OSB

Start OSB Server and login to sbconsole

Test the Project Explorer Link and create a new project

Test OSR

Start the OSR admin & managed servers







http://localhost:7111/registry/uddi/bsc/web

Wednesday, September 15, 2010

Oracle File Adapter & OSB 11g - debatching

Simple scenario -

I have a large input file adhering to the following XSD -






Business Processing:
The SSN will only be visible in the Response for persons living in the province specified in the header – in this case Munster.

- Sample input -




Such an input file could be large e.g.

1 PersonList Header element (specifying the province we are sending the data to e.g. the Irish province of Munster) and
1000s of Person elements, containing sensitive data such as SSN or as we in Ireland say PSN. So how can we leverage SOA Suite/OSB to do this efficiently?

Throttling is available with the Oracle File adapter so let's leverage it –



I created a simple SOA Composite (File Read --> Mediator --> FileWrite) and tested with the above input.

I checked in FMW console and saw that 3 instances had been created -

Instance 1 - Header + Person 1
Instance 2 - Person 2 + Person 3
Instance 1 - Person 4

Nice that the file adapter de-batching feature which gives us the Person elements wrapped in a



The only issue here is we have to validate the Person/Province against the Header/Province and, as you can see from the above, - it isn't there!

However, we do get this PersonList wrapper, so let's leverage this but changing the XSD slightly to include the destinationProvince as an attribute of the PersonList.




The new input XML file is as follows –




When I test this using the SOA composite I get 3 instances.

e.g.



Looks good – let’s go on to OSB.

OSB
Create an OSB Project and import JCA artifacts you created in JDeveloper



Generate Proxy based on readin_file





Generate Business Service based on writeOutFile



Add a Pipeline & Route Node to the Proxy Service




Route to the Business Service




Create a variable v_PersonList and Assign the $body/exam:PersonList to it

Add a FOR EACH action to the Request Pipeline



The FOR EACH is defined as follows -



As you can see, the FOR EACH includes the following -

Log - Log the number of Persons in the Message




Log - Log the current iteration




Log - the current Person ID




IF THEN --> here we check whether the province values match. If not we need
to wipe the SSN.





Test






This could also be a good use case for leveraging OSB's SplitJoin functionality!

Friday, September 10, 2010

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g

Great title just published by Packt Press


EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g






A must read for those interested in EJB 3.0 development on the Oracle FMW platform leveraging Oracle Enterprise Pack for Eclipse and JDeveloper 11g.

Wednesday, September 8, 2010

Oracle File Adapters: Windows Path on Linux

Scenario -

I create a SOA composite containing file Adapter (Write) in JDeveloper 11g.
I specify the output directory-file as D:\temp\order_out.txt

I then deploy this to an instance running on Enterprise Linux.

I test the composite and then view the trace in EM.

Everything has completed successfully -
Maybe one would expect the file adapter to throw an error due to the
"invalid" file name.

So where is the file?

I navigated to /user_projects/domains/soa_osb_domain/
and there I found the directory D:\temp and it did contain the order_out.txt file.