0% found this document useful (0 votes)
101 views

OSB - Using Java Callout in OSB

This document provides instructions for using a Java callout in Oracle Service Bus (OSB) to call a static Java method that returns an ID based on a social security number (SSN) passed to it. The Java method is packaged in a JAR file deployed to OSB. The callout retrieves the ID, which is then used to call a BPEL web service that returns a name based on the ID. The response from the BPEL service is sent back through the OSB route.

Uploaded by

SOA Training
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

OSB - Using Java Callout in OSB

This document provides instructions for using a Java callout in Oracle Service Bus (OSB) to call a static Java method that returns an ID based on a social security number (SSN) passed to it. The Java method is packaged in a JAR file deployed to OSB. The callout retrieves the ID, which is then used to call a BPEL web service that returns a name based on the ID. The response from the BPEL service is sent back through the OSB route.

Uploaded by

SOA Training
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Using Java Callout in OSB

This article is from the excellent Blog by oraclefusion1011.

See complete article here - http://oraclefusion1011.blogspot.com/2011/04/1.html. It is reproduced here for easy reference only. 1. Create a Java class that will have the Util methods , The method should be static public class MyOSBUtils { public static String getID(String ssn) { return "Id : "+getid_from_ssn(); } } 2.Create a JAR profile and deploy the project to JAR 3.Create a JAR resource in OSB inside project Explorer -> project -> Create Resource: -> JAR Give the JAR source File. 4. use Case - Bpel WS , returns Name based on ID - OSB consumer dont have ID and can pass ssn - Java callout based on ssn returns ID 5. - Create Bpel WS that returns Name based on ID - Create Direct Binding in Bpel , so OSB can call it 6. Create BS in OSB based on Direct Binding WSDL 7. Create proxy based on BS 8. Edit route: Request Actions: Java Callout to getID(Java class , select jar , then class and method) Parameters : xs:string($body/ret:process/ret:input) [need to type cast] Result : new_name [save in new parameter] 9. Add replace in Request Actions

replace - ./ret:process/ret:input - in variable body - with $new_name Flow : proxy(Input ssn)-> java callout (returns ID for SSN) -> Replace the input with ID -> Call bpel -> respond with Name

You might also like