Composite Invocation Changed from PS4(11.1.1.5)

As described in
http://download.oracle.com/docs/cd/E21043_01/apirefs.1111/e10659/oracle/soa/management/facade/Service.html#post_java_lang_String__oracle_fabric_common_NormalizedMessage_


Service invocation using oracle.soa.management.facade.Service is deprecated from PS4.

Instead, oracle.soa.api.DirectConnection is recommended further on. Here is the basic sample code:

try {

String operationName = "process";

String xml = "<ns1:process xmlns:ns1=\"http://xmlns.oracle.com/BPMTestApp/InvokeSOATest/AsyncBPEL\"><ns1:input></ns1:input></ns1:process>";


// domainName, compositeName, revision

CompositeDN compositeDN = new CompositeDN("default",

"InvokeSOATest", "1.0");

// DirectConnection - oracle-soa-client-api.jar

Locator compositeLocator = null;


Hashtable<String, String> jndiProps = new Hashtable();

jndiProps.put(Context.PROVIDER_URL,

"t3://jlee-soa11:7001/soa-infra");

jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,

"weblogic.jndi.WLInitialContextFactory");

jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");

jndiProps.put(Context.SECURITY_CREDENTIALS, "welcome1");


compositeLocator = LocatorFactory.createLocator(jndiProps);

// compositeDN, serviceName

DirectConnection dic = compositeLocator.createDirectConnection(

compositeDN, "DirectBinding");


// create a std dom parser

DOMParser parser = new DOMParser();

parser.parse(new InputSource(new StringReader(xml)));


Element element = parser.getDocument().getDocumentElement();

Map<String, Element> payload = new HashMap<String, Element>();

payload.put("payload", element);

Message<Element> xmlMessage = XMLMessageFactory.getInstance()

.createMessage(payload);


dic.post(operationName, xmlMessage);

} catch (Exception e) {

e.printStackTrace();

}


hope this helps.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Solution & Technology Architect, Asia Pacific

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today