Oracle Fusion Middleware Infrastructure Management Java API Reference for Oracle SOA Suite 11g Release 1 (11.1.1) E10659-01
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_
その代わりに、oracle.soa.api.DirectConnectionを利用したサービス実行が推奨されています。以下に簡単なサンプルコードを用意しました。
原文はこちら。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(); }
http://blogs.oracle.com/jaylee/entry/composite_invocation_changed_from_ps4
0 件のコメント:
コメントを投稿