BEAWebLogic Integration B2B Integration cxml t ªªªª 7.0 ªª ª ª : 2002 6
m Copyright 2002, BEA Systems, Inc. All Rights Reserved. ªª ª ªªª ª BEA Systems, Inc. vw ~ ª ªª v ª ª ª ª ªª ~ ªª ª ª ÿ BEA Systems, Inc. ˆ t tt fv w s tt BEA Systems, Inc. vw FAR 52.227-19 Commercial Computer Software-Restricted Rights ªªªªªªª (c)(1) DFARS 252.227-7013 Rights in Technical Data and Computer Software ªªªª ª ª ª (c)(1)(ii) NASA FAR t 16-52.227-86 Commercial Computer Software--Licensing ªªªª ªª ª (d) y ªª ª ª v BEA Systems, Inc. y ª ª ª ªªª ª ~ ««Š v BEA Systems, Inc. Š ª ª ª ªªª ª v s s ƒ BEA Jolt Tuxedo WebLogic BEA Systems, Inc. ƒ BEA Builder BEA Campaign Manager for WebLogic BEA elink BEA Manager BEA WebLogic Commerce Server BEA WebLogic Enterprise BEA WebLogic Enterprise Platform BEA WebLogic Express BEA WebLogic Integration BEA WebLogic Personalization Server BEA WebLogic Platform BEA WebLogic Server BEA WebLogic Workshop How Business Becomes E-Business BEA Systems, Inc m B2B Integration cxml t ªª ª ª ª ª ªªª ª ª 2002 6 7.0
目次 ªªª ª ywf...vi ªª ª ª... vi ~...vii ªªª ª...vii svu...viii 1. WebLogic Integration ªªªªªª cxml...1-1 cxml ªª ª ªª ª ª...1-3 cxml API...1-3 ªªªª ªªªªªª...1-3 ªª ªªe...1-4 ªªªªª v...1-5...1-5 2. cxml cxml ªªªª ªª ªª ª ª...2-1 ªªªªªªªª ª ªªªª ª...2-3 ªªª ª ª...2-3 ª ª ª ª ªªª ª ª...2-4 3. cxml API cxml ªªªª...3-2 ªªªªªªªª ª ª ªª ª ª ªªªª...3-5 cxml ªªªªª ~...3-5 cxml DTD...3-7...3-7 ª ª ªªª...3-8...3-8 ªªªªª...3-9 B2B Integration cxml t iii
~ ª ª ªªª...3-11 ªªªªª ~...3-12 ªªª ªªªª...3-14 ªªªª ª ª...3-14 ªªªª ªªª ª...3-19 4. cxml ªªª ªªª ªªª ª ªª cxml...4-1 ªªªªªª ªªª...4-2 ªªªª ª ªª ªªª...4-2 ª ª ª...4-2 vvª ª ª...4-3 ªªªª ª ª ªªª ª ª ª ª ª ª vv...4-3 ªªªª ªªªªª...4-4 cxml ªªªª ªªªªª...4-4 ªªªª ª ª ªªª u ª ª ª...4-5 KX $$+PVGITCVKQPE:/.Ê t
このマニュアルの内容 WebLogic Integration XOCP RosettaNet cxml ªªªªª u h ªªª ªª ªªªªªª ªªªª ªªªªªª WebLogic Integration ªª ª ªª v ªªª ª WebLogic Integration cxml h w : XOCP cxml ªªªª ª ª ª ªª WebLogic Integration ªªªª ˆ h v WebLogic Integration ªªªª ªªª WebLogic Integration cxml cxml ª ª ªªª ~ h v cxml User Guide «http://www.cxml.org«ªª ª ª 1 WebLogic Integration cxml u WebLogic Integration cxml t ªªªªªª w 2 cxml WebLogic Integration cxml ª ª ª ª ª Š w 3 cxml API cxml API u w 4 cxml ªªª ª ªª WebLogic Integration Studio cxml ªªª ªªª w B2B Integration «XML t v
ywf ªªª ª ªªª y WebLogic Integration Studio WebLogic Integration h ªªª ª ªª cxml t e vv ªªªª ªªªªvvf cxml API WebLogic Integration ª ª ªª ª ª ª ª ªªª ª ª t ªª ªªª ª ª f cxml WebLogic Integration ª ª ªªª ª ª v ªªªª f WebLogic Integration ªªªªªª u B2B Integration u ªª ª ª Web ªª ª [ ª ª ] ªª ª ª Web ªª ª ªªª ª ÿ 1 ª ª > ªªª ª PDF WebLogic Integration ªªª ª CD PDF Adobe Acrobat Reader ªª ª ª «ÿ «Adobe Acrobat Reader Adobe Web ª ª «http://www.adobe.co.jp/«vi B2B Integration «XML t
~ Java 2 Enterprise Edition «J2EE«eXtensible Markup Language «XML«Java ªªªª ª ªª v URL Javasoft Web ª ª http://java.sun.com URL BEA e-docs Web ª ª http://edocs.beasys.co.jp/e-docs/ cxml v URL cxml.org Web ª ª http://www.cxml.org ªªª ª WebLogic Integration ªªªªªª ªªª ª ªªªªª ˆ u z u ªªª docsupport-jp@bea.com ~ u WebLogic Integration ªªªªªª u BEA f ~ ª ªª ª ª ªªª BEA WebLogic Integration ªªªª 7.0 ªªª ªªª ªªª ª ª WebLogic Integration WebLogic Integration ª ª ª ªª Š BEA WebSUPPORT «http://websupport.bea.com/custsupp«~ BEA ªª ª ªªª ª ªªª ªªªª ~ t ªªªªª ªªª ªªª ª ªª v ªªª ªªªª ª ªª ªªª v ª ªª B2B Integration «XML t vii
ªª ª t ªªª ª ª Š s ªª ªªªªª svu ªª ª ª ~ svu sv Ctrl + Tab ÒÐÑÒ Ê ÒÐÑÒ w f w t ªª w ª ª ª ªªª ªªªª ªªªª ªª ª ª ªªª ~ ª ªªª ªªª ª ª ª ª ª ª ª ªª ª ª ªªªª ª ªª ª ª #include <iostream.h> void main ( ) the pointer psz chmod u+w * \tux\data\ap.doc tux.doc BITMAP float ªª ª u void commit ( ) viii B2B Integration «XML t
sv Ê Ò ÐÑÒ ªªª ª ªªª String expr ªª ª w LPT1 SIGNON OR { t g [ ] buildobjclient [-v] [-o name ] [-f file-list]... [-l file-list]... g v... ªªª ª ª ª t e ªª ªªª ~ v buildobjclient [-v] [-o name ] [-f file-list]... [-l file-list]...... ªªª ªªªª v B2B Integration «XML t ix
x B2B Integration «XML t
1 はじめに : cxml ªªªª ªª ª ªª WebLogic Integration ª ª ªª ˆ h v WebLogic Integration ªªªª ªªª ª ªª ª ªªªªªªªª cxml w cxml Ariba h XML zy ª ª ªª ª ª ª ª ªªª ª ª cxml WebLogic Integration w WebLogic Integration ªªªªªª cxml cxml API ªªªª ªªªªªª ªª ªªe ª ªªªª v WebLogic Integration ªªªªªª cxml WebLogic Integration cxml ªªª ª ªªªªªª ª cxml ªª ª ªª ª ª cxml API ªªª ª B2B Integration cxml t 1-1
1 cxml Business Process Management «BPM«ªªªª cxml API v 3 cxml API 4 cxml ªªªªªª WebLogic Integration cxml ªªªªªª WebLogic Integration cxml ªªªª. 1-1 WebLogic Integration cxml ªªªªªª WebLogic Integration cxml ªªªª cxml B2B Integration ªªªª ª ªªªª ªªªªª h B2B Integration ª ªªªªª v B2B Integration cxml vv Ariba Commerce Services Network ªª ª ªª ª 1-2 B2B Integration cxml t
cxml API cxml ªªª ªª ª ª cxml ªª ª ªª ª ª ~ ª ªªªª ªª ªªª ªªª ª ª cxml ª ªªªª ª ª ªªªª ~ h WebLogic Integration cxml ªªªª ª ªªª ª ª WebLogic Integration ªªª cxml ªªªªª URL WebLogic Integration B2B Console ª ªª ªªªª ª ª ª ª u cxml ªªªªª ªªª ªªªªªª WebLogic Integration ªª ª ªªªªªª ª ª WLC.dtd ª ª ªª ª ªªªªªª ª ª u cxml ªªªª ª ªª ª ª ªªª ª ª Bulk Loader ªªª ªªªªª ª ª ª ªªªª ª ªªª cxml API WebLogic Integration cxml ªªª ª ª ªªª ª ª API ªªª ª cxml API v 3 cxml API BEA WebLogic Integration Javadoc ªªªª ªªªªªª ªªªª ª ª ª ª ª ª ªª ª ª ª ªªªª ªª ªªª ªªªª WebLogic Integration s ªª ª ª ª ªª ª ª ª ªªª ªª ªª ª ª ª ª ªª ª ª ª ª ªªªª ªª ªªª ªª ª ª ª ªªª ªª ªª ª ª ª ªª ª ªª ª ª ª ªªªª ERP CRM ªªªª ªª ªªª ªªªª ª ªªª ªª ªª ª ª v B2B Integration u ªªªª ªªªª B2B Integration cxml t 1-3
1 cxml ªªªª ªªªªªª ªªªª ªª ªª ª ª ª ªª ª ªª ªª ª ª ª ª s ªª ª ª ª ªªªª ÿ ªªª ª Š ªªªª ªª ªª ª ª z t ªª ª ª ªªªª ªª ªª ª ª y Š ªªªª ª t ªª ª ª ÿd s ªªªª ªªª ª ª ªªª ªª ªª ª ª s u ªªª ª ~ ªª ª ª ª ªªªª t ª ª ªª ª ª ªª ª ªªªª ªªªªªª ªªª ªª ªªªª WebLogic Integration cxml h ª ªª ª ªªªª ªª t ªªª ªªª ª ªªª ª ª ªª ª ª cxml ªªªª ª ª ª ª ª ª v URL cxml.org Web ª ª http://www.cxml.org ªªªªe cxml ª ª ªª ª ª ª ª ªª ª cxml w ~ ªªª / ªª ªª ª ªªªª~ ªª ª ~ WebLogic Integration cxml ªªª ª t ª ªª ª ªªª ª ª v B2B Integration Administration Console ªª ª ªªª ª ªªª ªªªªª ~ https 1-4 B2B Integration cxml t
ª ª ªªª v cxml v1.2 Base64-encoded X.509 V3 v ªªª ªª ª ª ªª ªªe ªª ªªe WebLogic Integration t RSA CertJ ªª ªªe WebLogic Integration cxml ªª ªªe ªªª ª v URL cxml.org Web ª ª http://www.cxml.org ª ªªªª v cxml cxml ªªªªªª s cxml f «DTD«u cxml v u WebLogic Integration v h ªªª ª cxml ~ h WebLogic Integration ª ªªª ªªª ª ªª ªªv : ~ cxml 1.2 ªª ªªe ªªª ª cxml 1.2 ª ª ªªª ª ˆ ACSN ªª ªªª ª : Ariba Commerce Services Network ªª ª ªª ª ªªªªª ª ª ªªª ª ª ª ACSN ªªª ªª ª ªª ª ªªª ª ªªªª t B2B Integration cxml t 1-5
1 1-6 B2B Integration cxml t
2 cxml の管理 : cxml ªªªª ªª ª ªª WebLogic Integration ª ª ªª ˆ h BEA WebLogic Integration ªªªª ªªª cxml ª ª ªª ª ª ª ª WebLogic Integration B2B Console s cxml ª ª ªª ª ª ª ª ªªª ª u ª ªª w cxml ªªªª ªª ªª ª ª ªªª ªªª ª ª ª ªªªª ª ªªª ª ª cxml ªªªª ªª ªª ª ª cxml ªªªª ªª ªª ª ª v ª ªª ª ªª ªª ª ªªª ªªª ªªªª ª ª ªªª ªªª ªªª B2B Integration w cxml k ~ cxml ªªªªªªªª ª ª ª ª B2B Integration cxml t 2-1
2 cxml 2-1 cxml ªªª ª ª ª ªªª ªªªªª ª Ariba Commerce Services Network «ACSN«ªª ª ª ªª ª ª ª ª ªª s ª ªªª ªª ªª ª ª ~ ªªª ª ªª ª ª ª ª ª ª ªª ª ªªªª ªªª ª ªªªª ªª ªªªªª ªª ªª ªªªª ª ª ªª ª ªª ª ªª ª ªªª ªªªªªª ªªª ª ªªªªª ª ª ªªª ª ª ªª ª ª ~ ªªªª ªª ªª ªª ªª ªªªª ªªª ACSN ªª h WebLogic Integration cxml ACSN ÿ v ªª WebLogic Integration ªª ªª ªªªª ªªª ª ª ª ªªª ª ªªªª cxml ªªª ª ª ªª ª ª ª ª ªª h 2-2 B2B Integration cxml t
ªªªªªªª ª ªª ªª ªª ªªªªªªªª ªªªª ª ª cxml ª ª ª ªªª ª ª ª ªªªª ª ª ªªª ªª ªª ª ªª ªªª ªªªªª ª ªªª ªªª ª ª ªªªªªª ªªª ªªª ª ª ª ªªª ª ª v B2B Integration ª B2B Integration Administration Console ªª ª ªªª ªªª ªªª ª ª ª ªªªª ª ªªª ªªªª ª ª 1 u ~ y ªªª ªªªªªª cxml Ariba Commerce Services Network vvªª y ªªªª ªª ªª ª ª ACSN ~ ª ª ª ª ªªª ª ª i ªªªª ªª ªª ª ª f ACSN ƒ ªªª ª ª WebLogic Integration cxml 1.1 y ªªª ªª ªªª ª ªª ª ªªª ª ªªªª v ªª ª ª ªªª ª v ªªªªª ªª ªªª ª ªªª ª ª ªª ª ª ªª ª ª ª ª 1 1 ªªª ª ª ªªªª t ª ªªª ªª ªª ª ª ÿ u cxml 1.2 Base64-encoded X.509 V3 v ªªª ªª ªªe t WebLogic Integration ªªªª e t ªªª ª B2B Integration cxml t 2-3
2 cxml ª ª ª ªªªª ª ª ª ªª ª ªªª ª ª WebLogic Integration B2B Console B2B Integration Administration Console ªª ª ªªª 2-4 B2B Integration cxml t
3 cxml API の使用 : cxml ªªªª ªª ª ªª WebLogic Integration ª ª ªª ˆ h v WebLogic Integration ªªªª ªªª cxml API u ªªª ª ª ªª Š w cxml ª ª ªª cxml ªªªªª ~ cxml DTD ª ª ªªª ~ ª ª ªªª ªªªª ªªªª ª ªª v B2B Integration ªªªª ªª B2B Integration cxml t 3-1
3 cxml API cxml ªªªª s cxml ªªªªª ª ª ªª s 3-1 ªª ª ª ª cxml ªªªª ªªªª ªªªªª w onmessage deregister getinstance getsharedsecret register gethttpstatuscode getasstring getdocument CXMLListener CXMLManager CXMLManager CXMLManager CXMLManager CXMLHttpStatusException messaging.cxmldocument messaging.cxmldocument ~ CXMLMessage CXMLManager ªªªª ª ª ª ƒ u ª ª ª ª ª ªª ƒ CXMLManager ªªªªª ªªªª ªª ªª ª ª ª ªªª ª ª ªª ª ª CXMLManager ª ª ªª ªªª ƒ ªªªª ªª ª ª ªªª ªª ªª ª ª ª ª ªªªª ª ª ª ªªªªª cxml ª ªªªª ~ HTTP ªªªªª ªªª cxml ªª ª ~ XML ªªªª ªª 3-2 B2B Integration cxml t
cxml ª ªªª s 3-1 ªªªªª cxml ªªªª ªªªª ªªªªª w getfromcredentialdo mains getfromcredentialid entities getidentifier getnodevalue getsendercredential Domain getsendercredential Identity getsendersharedsecr et getsenderuseragent gettimestamp gettocredentialdoma in gettocredentialiden tity getversion messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument messaging.cxmldocument ªªªªªª ªªª From Credential Domain ªªªªªª ªªª From Credential Identity ª ª ªx ª ªªªªx XPath ª ªªªªª ªªª ªªªªªª ªªª t ªªª XPath ÿi ª ª ª ªªªªªª ªªª Sender Credential Domain ªªªªªª ªªª Sender Credential Identity ªªªªªª ªªª Sender Credential Shared Secret ªªªªªª ªªª Sender User Agent ªªªªªª ª ªªªªª ª ªªªª ª ªªªªª ªªªªªª ªªª To Credential Domain ªªªªªª ªªª To Credential Identity ªªªªªª ªªª ª ª B2B Integration cxml t 3-3
3 cxml API s 3-1 ªª ª ª ª cxml ªªªª ªªªª ªªªªª w setdocument setnodevalue reply getreplydocument getrequestdocument send setcollaborationagr eement setreplydocument setrequestdocument messaging.cxmldocument messaging.cxmldocument messaging.cxmlmessage messaging.cxmlmessage messaging.cxmlmessage messaging.cxmlmessage messaging.cxmlmessage messaging.cxmlmessage messaging.cxmlmessage ~ XML ªªªª ªª v XPath ª ªª ªª ª ªªª v ªªªªªª ªªª u ª ªªªª ª ª ªª ªª ª ª CXMLListener.onMessage() ªª ªªª ª ª ªª ˆ ~ cxml ªªªªªª u cxml ªªªªªª u ª ªªªª ~ ª ª ªª ª ªªª getreplydocument() ª ªª ª ªªªª ª ªªªª ªªª ªªªªªª ªªªªª ªªª ªªªªª ª ID v ªªªª ªªª ª ªªªªªªª ª ªªªª ª cxml ªªªªªª v u cxml ªªªªªª v 3-4 B2B Integration cxml t
cxml ª ª ª ªª ~ s 3-1 ªªªªª cxml ªªªª ªªªª ªªªªª w gethttpstatuscode messaging.cxmlmessagetoken HTTP ªªªªª ªªª ª ª ª ª v BEA WebLogic Integration Javadoc ªªªªªª ª ª ªªªªªª ªªªª cxml f ª ªªª ª ª ª ÿ ª ª ª ªªª ª ª ªªªªªª ª ª ª ªªª ª ª ª ªªª ª ª ª ªªª u BusinessProcessName BusinessProcessVersion DeliveryChannel torole fromtradingpartner totradingpartner cxml ª ªªªª ~ cxml ªªªªª ªªªªª ªªªªª ªªª ª ª ªªª ªªªªª ªªª ~ B2B Integration cxml t 3-5
3 cxml API 3-1 cxml ªªªªª ªªªªªª ªªªªª ªªª ~ ª ª ª «ªªª v «From To Sender ªª ª «ªªª ª ª ªª ª ª ª ª ªªª f v ª ªªª «ª ªªªª ªªªª ªªªªªª ª ª ª ª ªªª ª ª ª ªªª ª ªªªªªª ªª ª ª u ªªªª ªªªªªª «1 t cxml ªªªªªª ª ªª ªª ª cxml ªª ª ªª ª cxml DTD v cxml ªªªªªª «ªªª cxml ª ª ª ª ª ª cxml ªªªªªª cxml DTD v ª ª «ªª ª ª MIME ªªªª ª ªª ª ªª ªª WebLogic Integration cxml ª ª ªªª ª ª ª ªª ª ªªªª ªªª ªªªª ª ª MIME ªªªª ª ª u 3-6 B2B Integration cxml t
cxml DTD cxml DTD u DTD cxml DTD URL cxml.org Web ª ª http://xml.cxml.org/schemas/cxml/version/cxml.dtd version cxml ªªª ª ª «1.1 1.2 «v l~ ª ª ªª ª ª ª ª URL DTD http://xml.cxml.org/schemas/cxml/version/fulfill.dtd version cxml ªªª ª ª «1.1 1.2 «cxml ª ª ªªª ~ DTD v cxml ª ªªªªªª ~ 1 ~ ª ª ªªª v ªªªª ªª ªª ª ª ~ ªª ª ª ªªªª DTD v ª ªªª ªª ªª ª ª ~ Š ªª ª ª ª ª ªªª v u ª ª ªª ªª cxml API ªªªª ª ªªª GetSharedSecret ª ª ª ª ª ªª ª ª ªªªªªª ~ cxml ªªªªªª ª ª ª ª ª ª ªªªª ªª ª ª ª ªªª v s u ªªªª ª ªªª ªªªªª ª ~ ª ª ª ª ª ª ª ª ª ª ª ª ª ~ cxml ªªªªªª Credential ª ª ª u B2B Integration cxml t 3-7
3 cxml API ª ª ªªª ª ª ªªª ª ª ªªª u ƒ h ª ª ª ªªª ª ª ª ª ª ª ª ª ª ªª ~ ª ª ªªª ª ª ~ ªªªª ªªªª ª ª ªªª ~ cxml ªªªªª ª ª ªªª s 1. ªªª ªª ª ª ªªª 2. ªªªª ªªªª f private static CXMLToken token; 3. cxml Manager ªªª CXMLManager ª ªªªª private static CXMLManager cxmlm = CXMLManager.getInstance(); 4. ªªªª ªªª f ªªªªªªª ªªª ƒ ª ªªª ÿ ª ª ª ªªª ª ª ª ªªª ª ª ª ªª ÿ ªªª ªªª ª ª ª ªªª ª ª ª ªª u ªªªª 3-5 ªªª ª ªª ªªª ª ª ªªªªªª ªªªª prop.setproperty("businessprocess", businessprocess); prop.setproperty("businessprocessversion", businessprocessversion); prop.setproperty("deliverychannel", deliverychannel); prop.setproperty("thistradingpartner", mytradingpartnername); prop.setproperty("othertradingpartner", othertradingpartnername); prop.setproperty("torole", torole); prop.setproperty("party", "duns4"); 5. CXMLManager ªªª ƒ ª ª ªª token = cxmlm.register(prop); 3-8 B2B Integration cxml t
ª ª ª ªª ª ªªªª w ª ª ªªª ª ª ªªª ª ª ªªª ª ª s u 1. onmessage() ªªªªª ª ª ª ª ª cxml ªªªª ª u cxml ªªªªªª ªª ª ª cxml ªªªªª WebLogic Integration ªªª ª ªªªªªª ª ªªª 2. cxml ªªªªªª XML DOM ªªªªªª // cxml ÒÐÕÕ ÒÎ CXMLDocument reqmsgdoc = cmsg.getrequestdocument(); // XML DOM ÒÐÕÕ ÒÎ Document reqxmldoc = reqmsgdoc.getdocument(); 3. ª ªª ª u ªªªªªª 4. ª ª ªªª ª ª ªª ª ª ªª ª ª ª ª ªªª //cxml/header/from/credential f String othersharedsecret = cxmlm.getsharedsecret(othertradingpartnername); 5. ª ª ªªª ª ªªª ª ª ªª ª ª ª ªª ª ªªª ª ª f ÿi v ªªªªª ªªª ª ªª ª ª ªªª ª ª ªª ª ª ª ª ª ªª ª ª ªªªªª ª ª ªª ª ªªª ªª ªª ª ª ªª debug("stored Shared Secret for " + othertradingpartnername + ": " + othersharedsecret); ªª ª ª B2B Integration cxml t 3-9
3 cxml API s 3-2 ªª ª ª s ªªªªª http ª ªªª ª ªªª 400 «u «s ªªªªª http ª ªªª ª ªªª 401 «ªªª«s ªªªªª http ª ªªª ª ªªª 500 «u ~ h«s ª ªªª ªª ªª ª ª ªªª ªªªª ª ª u ª ª ªªª u Š WebLogic Integration ªªª ª u ÿi ª ªª ª ªª ªªª ª ª ª Š WebLogic Integration ª ªª ª u 6. XML DOM t ª ª ª ª ª ª 3-10 B2B Integration cxml t DOMImplementationImpl domi = new DOMImplementationImpl(); DocumentType dtype = domi.createdocumenttype("request", null, "cxml.dtd"); org.w3c.dom.document punchoutdoc = new DocumentImpl(dType); CxmlElementFactory cf = new CxmlElementFactory(punchoutDoc); 7. cxml ªªªªªª Element request = punchoutdoc.createelement("request"); 8. ªªªªªª ª ª ªu // ÔÒÑ cf.createheaderelement( // ~ cf.createfromelement( cf.createcredentialelement( "DUNS", mytradingpartnername, null)),
~ ª ª ª ªª // ~ cf.createtoelement( cf.createcredentialelement( "DUNS", othertradingpartnername, null)), // ~ f cf.createsenderelement( cf.createcredentialelement( "AribaNetworkUserId", "admin@acme.com", othersharedsecret), "Ariba ORMS 5.1P4")), 9. cxml ªªªªªª XML ªªªªªª v CXMLDocument replymsgdoc = new CXMLDocument(); replymsgdoc.setdocument(replyxmldoc); 10. cxml ªªªªª cxml ªªªªªª v cmsg.setreplydocument(replymsgdoc); 11. cxml ªªªªª ªªª ªªª ª ª ª ª ª ª ª ª v cmsg.setcollaborationagreement(prop); 12. ªªªªª ~ ~ cxml ªªªªª ªªªªªªª WebLogic Integration ªªª ª ª ªªªª cmsg.reply(); ~ ª ªªªª ~ ª ª ªªª ~ ª ª ªªª u 1. ªªªª ªªªª f private static CXMLToken token; 2. cxml Manager ª ªª ªªªªª CXMLManager. private static CXMLManager cxmlm = CXMLManager.getInstance(); B2B Integration cxml t 3-11
3 cxml API 3. ªªªª ªª ª f ªªªªªª ª ƒ ª ªªª ÿ ª ª ª ªªª ª ª ª ªªªª ª ª ª ª ÿ ª ªª ªªª ª ª ª ªªª ª ª ª ªª u ªªªª 3-5 ªªª ª ª ª ªªª ª ª ª ªªª ª ª ªªªª prop.setproperty("businessprocess", businessprocess); prop.setproperty("businessprocessversion", businessprocessversion); prop.setproperty("deliverychannel", deliverychannel); prop.setproperty("thistradingpartner", mytradingpartnername); prop.setproperty("othertradingpartner", othertradingpartnername); prop.setproperty("torole", torole); prop.setproperty("party", "duns4"); 4. register ª ª ªª token = cxmlm.register(prop); ª ªªªª ~ ª ª ªªª ~ ª ª ªªª ª ª ª ª ª ª s u 1. cxml ªªªªª 3-12 B2B Integration cxml t DOMImplementationImpl domi = new DOMImplementationImpl(); DocumentType dtype = domi.createdocumenttype("request", null, "cxml.dtd"); org.w3c.dom.document punchoutdoc = new DocumentImpl(dType); CxmlElementFactory cf = new CxmlElementFactory(punchoutDoc); 2. XML DOM u ªªªªªª Element request = punchoutdoc.createelement("request"); Element trans = punchoutdoc.createelement(&dlq;punchoutsetuprequest&drq;); request.appendchild(trans); 3. u ªªªªªª ª ª ªu punchoutdoc.appendchild( cf.createcxmlelement( // ÔÒÑ
~ ª ª ª ªª cf.createheaderelement( // ~ cf.createfromelement( cf.createcredentialelement( "DUNS", mytradingpartnername, null)), // ~ cf.createtoelement( cf.createcredentialelement( "DUNS", othertradingpartnername, null)), // ~ f cf.createsenderelement( cf.createcredentialelement( "AribaNetworkUserId", "admin@acme.com", othersharedsecret), "Ariba ORMS 5.1P4")), 4. v ªªªª ªª ªª ª ª ªªª ª ªªªª ª ª ªª ª ª ª ªª ª ªªªªª ªªªª ªª ªª ª ª ªª ªªª ªª ª ª ªªª ªª ªªªª ªª ªª ª ª «//cxml/header/to/credential f «~ f u «//cxml/header/sender/credential f «String othersharedsecret = cxmlm.getsharedsecret(othertradingpartnername); debug("stored Shared Secret for " + othertradingpartnername + ": " + othersharedsecret); 5. cxml ªªªªªª CXMLDocument reqmsgdoc = new CXMLDocument(); 6. cxml ªªªªª cxml ªªªªªª v reqmsgdoc.setdocument(reqxmldoc); cmsg.setrequestdocument(reqmsgdoc); 7. cxml ªªªªª ªªª ªªª ª ª ª ª ª ª ª ª v cmsg.setcollaborationagreement(prop); 8. ªªªªª ~ B2B Integration cxml t 3-13
3 cxml API CXMLMessageToken sendtoken = (CXMLMessageToken) cmsg.send(); 9. ªªªªªª CXMLDocument replymsgdoc = cmsg.getreplydocument(); 10. XML ªªªªªª org.w3c.dom.document replyxmldoc = replymsgdoc.getdocument(); 11. v ªªª ªªªª ª ª ªªª ª ª ªªªª ªªª cxml ª ª ª ~ s ª ªª ª ªªª ªªªªªª cxml ª ªª v BEA WebLogic Integration Javadoc ªªªª ª ª ªªª ªªª 3-1 ªªªª ª ª ªªª /* * Copyright (c) 2001 BEA * All rights reserved */ package examples.ibcxmlverifier; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.w3c.dom.*; import org.apache.html.dom.*; import org.apache.xml.serialize.*; import org.apache.xerces.dom.*; import messaging.*; 3-14 B2B Integration cxml t
~ ª ª ª ªª import *; import com.bea.eci.logging.*; /** * This example provides a simple test that will verify message flow of cxml * peer-to-peer sending and receiving a cxml document. * The two peers (Partner1 and Partner2) are running on a single WLS. * Partner1 sends a PunchoutRequest to Partner2. Partner2 generates a * PunchoutSetupResponse and returns it to Partner1. Shared Secrets are verified * at both ends. */ public class Partner1Servlet extends HttpServlet { static final boolean DEBUG = true; private final static String businessprocess = "PunchoutSetup"; private final static String businessprocessversion = "1.1.009"; private final static String deliverychannel = "CXMLPartnerVerifier1"; private final static String mytradingpartnername = "CXMLPartnerVerifier1"; private final static String othertradingpartnername = "CXMLPartnerVerifier2"; private final static String torole = "Supplier"; private final static String expectedurl = "http://xyz/abc?from=" + mytradingpartnername; private DocSerializer ds; // ÇÊÎÔÖÐ ÑÕ ÊÒ Ð Î private static CXMLToken token; // ÔÓ ÑÕ Ï ÑÑ ÑÎ private static CXMLManager cxmlm = CXMLManager.getInstance(); private static Properties prop = new Properties(); public void init(servletconfig sc) { try { debug("initializing servlet for Partner1"); // ÐÖÔÖ ÑÕ ÎÐÖ Õ ÒÎ ÈÍÉÌÊÔÖÓÒÏÎv prop.setproperty("businessprocess", businessprocess); prop.setproperty("businessprocessversion", businessprocessversion); prop.setproperty("deliverychannel", deliverychannel); prop.setproperty("thistradingpartner", mytradingpartnername); prop.setproperty("othertradingpartner", othertradingpartnername); prop.setproperty("torole", torole); prop.setproperty("party", "duns4"); B2B Integration cxml t 3-15
3 cxml API // ÔÖÓÒÏÎ ÈÉÓÏÕÎÔÓ ÑÕÊ ƒ token = cxmlm.register(prop); catch (Exception e) { debug("cxmlpartnerverifier1 init exception: " + e); e.printstacktrace(); private org.w3c.dom.document getbusinessdocument() { DOMImplementationImpl domi = new DOMImplementationImpl(); DocumentType dtype = domi.createdocumenttype("request", null, "cxml.dtd"); org.w3c.dom.document punchoutdoc = new DocumentImpl(dType); CxmlElementFactory cf = new CxmlElementFactory(punchoutDoc); try { String othersharedsecret = cxmlm.getsharedsecret(othertradingpartnername); debug("stored Shared Secret for " + othertradingpartnername + ": " + othersharedsecret); // ÔÒÑ Element request = punchoutdoc.createelement("request"); Element trans = punchoutdoc.createelement("punchoutsetuprequest"); request.appendchild(trans); punchoutdoc.appendchild( cf.createcxmlelement( // ÔÏÖ Ò "1233444-200@ariba.acme.com", // ÔÒÑ cf.createheaderelement( // ~ cf.createfromelement( cf.createcredentialelement( "DUNS", mytradingpartnername, null)), // ~ cf.createtoelement( cf.createcredentialelement( "DUNS", othertradingpartnername, null)), 3-16 B2B Integration cxml t
~ ª ª ª ªª // ~ f cf.createsenderelement( cf.createcredentialelement( "AribaNetworkUserId", "admin@acme.com", othersharedsecret), "Ariba ORMS 5.1P4")), // u request)); catch( Exception e ) { debug("messagedeliveryexception: " + e.tostring()); e.printstacktrace(); return punchoutdoc; /** * The actual work is done in this routine. Construct a message document, * publish the message, wait for a reply, terminate and report back. */ public void service(httpservletrequest req, HttpServletResponse res) throws ServletException, IOException { try { // ÐÖÏÎ ÒËÊ s ÊÑÒÒÎÒÔ res.setcontenttype("text/html"); PrintWriter pw = res.getwriter(); pw.println("<html><body BGCOLOR=#ff0000>"); pw.println("<p><img SRC=logo.jpg WIDTH=185 HEIGHT=156"+ " ALIGN=TOP BORDER=0 NATURALSIZEFLAG=3></P>"); pw.println("<p><font SIZE=-1>Partner1 process flow:<br>"); pw.println("starting Partner1..."); debug("starting Partner1: get Document..."); CXMLMessage cmsg = new CXMLMessage(); org.w3c.dom.document reqxmldoc = getbusinessdocument(); CXMLDocument reqmsgdoc = new CXMLDocument(); reqmsgdoc.setdocument(reqxmldoc); cmsg.setrequestdocument(reqmsgdoc); DocSerializer ds = new DocSerializer(); B2B Integration cxml t 3-17
3 cxml API debug("buyer: request document:\n" + ds.doctostring(reqxmldoc, true) + "\n"); // ÔÖÓÒÏÉ CA Îv cmsg.setcollaborationagreement(prop); // ÕÒÑ ÑÎ~ ÈÉ Î CXMLMessageToken sendtoken = (CXMLMessageToken) cmsg.send(); CXMLDocument replymsgdoc = cmsg.getreplydocument(); debug("got document"); if (replymsgdoc == null) { debug("replymsgdoc bad"); org.w3c.dom.document replyxmldoc = replymsgdoc.getdocument(); debug("buyer: reply document:\n" + ds.doctostring(replyxmldoc, true) + "\n"); // Ê Ê Î v String punchouturl = replymsgdoc.getnodevalue( "//cxml/response/punchoutsetupresponse/startpage/url"); if (punchouturl.equals(expectedurl)) { debug("correct response received"); pw.println("<p>correct response received"); else { debug("unexpected response received"); pw.println("<p>unexpected response received"); // Çi ÊÌÊÉÆÍÇÉÎ v String dss = replymsgdoc.getsendersharedsecret(); debug("document Shared Secret for " + mytradingpartnername + ": " + dss); String sss = cxmlm.getsharedsecret(mytradingpartnername); debug("stored Shared Secret for " + mytradingpartnername + ": " + sss); if (dss.equals(sss)) { debug("shared Secret match"); pw.println("<p>shared Secret match"); else { debug("shared Secret mismatch"); pw.println("<p>shared Secret mismatch"); 3-18 B2B Integration cxml t
~ ª ª ª ªª catch( Exception e ) { debug("messagedeliveryexception: " + e.tostring()); e.printstacktrace(); /** * A simple routine that writes to the wlc log */ private static void debug(string msg){ if (DEBUG) UserLog.log("***Partner1Servlet: " + msg); ªªªª ªªª ª ªªª ªªª 3-2 ªªªª ªªª ª ªªª /* * Copyright (c) 20001 BEA * All rights reserved */ package examples.ibcxmlverifier; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.w3c.dom.*; import org.apache.html.dom.*; import org.apache.xml.serialize.*; import org.apache.xerces.dom.*; import com.bea.b2b.protocol.messaging.*; import messaging.*; import CXMLListener; import *; import com.bea.eci.logging.*; /** B2B Integration cxml t 3-19
3 cxml API * This example provides a simple test that will verify message flow of cxml * peer-to-peer sending and receiving a cxml document. * The two peers (Partner1 and Partner2) are running on a single WLS. * Partner1 sends a PunchoutRequest to Partner2. Partner2 generates a * PunchoutSetupResponse and returns it to Partner1. Shared Secrets are verified * at both ends. */ public class Partner2Servlet extends HttpServlet { static final boolean DEBUG = true; private final static String businessprocess = "PunchoutSetup"; private final static String businessprocessversion = "1.1.009"; private final static String deliverychannel = "CXMLPartnerVerifier2"; private final static String mytradingpartnername = "CXMLPartnerVerifier2"; private final static String othertradingpartnername = "CXMLPartnerVerifier1"; private final static String torole = "Buyer"; // ÇÊÎÔÖÐ ÑÕ ÊÒ Ð Î private static CXMLToken token; // ÔÓ ÑÕ Ï ÑÑ ÑÎ private static CXMLManager cxmlm = CXMLManager.getInstance(); private static Properties prop = new Properties(); public void init(servletconfig sc) { try { debug("initializing servlet for Partner2"); // ÐÖÔÖ ÑÕ ÎÐÖ Õ ÒÎ ÈÍÉÌÊÔÖÓÒÏÎv prop.setproperty("businessprocess", businessprocess); prop.setproperty("businessprocessversion", businessprocessversion); prop.setproperty("deliverychannel", deliverychannel); prop.setproperty("thistradingpartner", mytradingpartnername); prop.setproperty("othertradingpartner", othertradingpartnername); prop.setproperty("torole", torole); prop.setproperty("party", "duns5"); // ÔÖÓÒÏÎ ÈÉÐÔÖÏÕ ÖÑÒÎÔÓ ÑÕÊ ƒ token = cxmlm.register(new Partner2MessageListener(), prop); debug("partner2 waiting for message..."); catch (Exception e) { debug("cxmlpartnerverifier2 init exception: " + e); e.printstacktrace(); 3-20 B2B Integration cxml t
~ ª ª ª ªª /** * This routine starts the peer */ public void service(httpservletrequest req, HttpServletResponse res) throws ServletException, IOException{ debug("starting Partner2"); /** * A simple routine that writes to the wls log */ private static void debug(string msg){ if (DEBUG) UserLog.log("***Partner2Servlet: " + msg); public class Partner2MessageListener implements CXMLListener { public void onmessage(cxmlmessage cmsg) { XPathHelper xp = new XPathHelper(); try { debug("partner2 received message"); // QualityOfService qos = cmsg.getqos(); CXMLDocument reqmsgdoc = cmsg.getrequestdocument(); if (reqmsgdoc == null){ throw new Exception("Did not get a request payload"); Document reqxmldoc = reqmsgdoc.getdocument(); if (reqxmldoc == null){ throw new Exception("Did not get a request document"); String from = reqmsgdoc.getnodevalue( "//cxml/header/from/credential/identity" ); if (from == null) { from = "nobody"; debug("received request from " + from ); DocSerializer ds = new DocSerializer(); debug("supplier: request document:\n" + ds.doctostring(reqxmldoc, true) + "\n"); debug("building reply document"); B2B Integration cxml t 3-21
3 cxml API DOMImplementationImpl domi = new DOMImplementationImpl(); DocumentType dtype = domi.createdocumenttype("response", null, "cxml.dtd"); org.w3c.dom.document replyxmldoc = new DocumentImpl(dType); CxmlElementFactory cf = new CxmlElementFactory( replyxmldoc ); String othersharedsecret = cxmlm.getsharedsecret(othertradingpartnername); debug("stored Shared Secret for " + othertradingpartnername + ": " + othersharedsecret); replyxmldoc.appendchild( cf.createcxmlelement( // ÔÏÖ Ò "1233444-200@ariba.acme.com", // ÔÒÑ cf.createheaderelement( // ~ cf.createfromelement( cf.createcredentialelement( "DUNS", mytradingpartnername, null)), // ~ cf.createtoelement( cf.createcredentialelement( "DUNS", othertradingpartnername, null)), // ~ f cf.createsenderelement( cf.createcredentialelement( "AribaNetworkUserId", "admin@acme.com", othersharedsecret), "Ariba ORMS 5.1P4")), // cf.createresponseelement( "200", "ok", cf.createpunchoutsetupresponseelement( "http://xyz/abc?from=" + from )))); CXMLDocument replymsgdoc = new CXMLDocument(); replymsgdoc.setdocument(replyxmldoc); 3-22 B2B Integration cxml t
~ ª ª ª ªª cmsg.setreplydocument(replymsgdoc); debug("supplier: reply document:\n" + ds.doctostring(replyxmldoc, true) + "\n"); // Çi ÊÌÊÉÆÍÇÉÎ v String dss = reqmsgdoc.getsendersharedsecret(); debug("document Shared Secret for " + mytradingpartnername + ": " + dss); String sss = cxmlm.getsharedsecret(mytradingpartnername); debug("stored Shared Secret for " + mytradingpartnername + ": " + sss); if (dss.equals(sss)) { debug("shared Secret match"); else { debug("shared Secret mismatch"); // ÔÖÓÒÏÉ CA Îv cmsg.setcollaborationagreement(prop); cmsg.reply(); debug("partner2 sent reply"); catch(exception e) { debug("exception errors" + e); e.printstacktrace(); public void onterminate(message msg) throws Exception { debug(" received terminate notification for " + msg.getconversationid()); // ÔÓ ÑÕÇÍ ƒîu cxmlm.deregister(prop); B2B Integration cxml t 3-23
3 cxml API 3-24 B2B Integration cxml t
4 cxml でのワークフローの使用 : cxml ªªªª ªª ª ªª WebLogic Integration ª ª ªª ˆ h v WebLogic Integration ªªªª ªªª WebLogic Integration Business Process Management «BPM«ªªªªªª ~ ªªªª ªªªªª WebLogic Integration cxml ªªª ª ªªªª ªªªª ª ª cxml ªªªª ª ª ª ª ª ª ªªªªªª cxml API ªªª ªª WebLogic Integration cxml ªªªª ª ª ªªª w ªªª ªªª cxml ªªªª ªªªªª ªªªªªª vv ªªªª ªªªªª WebLogic Integration ªª ª ª ªª B2B Integration ªªªªªª ªªª ªªª cxml cxml ªª ª ª ªª ª ªª ª ªªªª ª ªª ªª WebLogic Integration cxml API ªªª u ª ª ªª ª ªªª ªªª f ªª ªª s ªªªªªª ª ª ª ª f cxml ªªªª ªªªª ª ª s B2B Integration cxml t 4-1
4 cxml ªªª ª ªª ªªª ªªª ªªª cxml BPM ªª ª ª ªª ªªª vvªªª ªªªª ª ªª ª ª ª u ªªªª ªªª ªªª ªªªª ªªªª ª ªª ª ª cxml API ªªªª ªªªª ª ª s ªªª ª ªª PunchoutSetupRequest h t ª ª ª v URL cxml User's Guide http://www.cxml.org ªªªªªª ªª ªªª ªª ªªª ª ª ª u ªªª ª ªª ªª ªªª ª ªª ªª ªªª cxml v ªªª ªª ªª f ªªªªª ªªª ªªªªªª WebLogic Integration Studio [ ªªª ªªªªªª ] ª ª ªª [ ªªªª ªªªª ª ª ] v WebLogic Integration Studio ªªªªª ª WebLogic Integration Studio cxml ªªªª ªªªª ªªªª ª ª ªªª ªªª ªªªª ªªªª ~ [ ªªªª ~ ] ª ªª ª ªªª [ ª ª ª ª ] ª ªª [ ªªªª ªªªª ª ª s ] ªª ª ª ªªªªªª cxml ª ªªª ª ª ª ª ª ªª ªª ªªª ª ª ª v WebLogic Integration Studio ªªªªª ª ª ª ª ªªªªªª cxml ª ª ª u ª ª ª WebLogic Integration Studio WebLogic Integration ªªª ª ªª ~ s ªªª ~ 4-2 B2B Integration cxml t
ªªªª ª ª ªªª ªªª ª ª ª vv WebLogic Integration B2B Console WebLogic Integration ªªª ªª cxml ªªªªªªªª ªª ª «ªªªª ªª ªª ª ª ª ª ª ªªª ª ª ª ªªªª ª «ªªª ª ªªª ª ª v B2B Integration ª ªªªª ªªªª ª ªª ªª WebLogic Integration Studio ªªªª ªªªª ª ª ªªªª ªªªª ª ªª ªª ªªªª ªªªª ª ª 3 cxml API vvª ª ª ªªª ªªª cxml WebLogic Integration ªªª ª ªª u vvª ª ª vv s u ªªªª ªªªª ª ª cxml h s ªªªªªª vv u s u cxml h ªªªª ªªªª ª ª u ªªªª ªªªªª ªª ªªªª vv WebLogic Integration ªªªª ª ª ªªª ªªª ª ªª WebLogic Integration Studio ªªªªªª ªªªªªª f vv ªªª ª ªª v WebLogic Integration Studio ªªªªª ª B2B Integration ªªªªªª ~ ªª ª ª ª ª cxml ªªª ª ªªª ªªªªªª cxml API t u ªªªª ªªªª ª ª ª ª ª w ªªªª ªªªª ª ªª ª ª WebLogic Integration BPM ª ªªªªª ª cxml w B2B Integration cxml t 4-3
4 cxml ªªª ª ªª ªªªª ª ªªªª WebLogic Integration Studio ª ªªª ªª ªª ª ª ªªª ª ªªªªª cxml ª ª ª s 1 ªªª ª ªª cxml ªªªª ªªªªª w cxml ªªªª ªªªªª ªªªª ª ª ªªª u ª ª ª cxml ªªªª ª ªªªª cxml ªªªª ªªªªª v ª ªªª ªª ªª ª ª ~ cxml ªªªª ªªªªª u ªªªªª ª MIME ªªªªª ªªªª ªªªªªª ªªªª ªªªªª XML ªªª ª ªª ª ª ªªª ªªªª ªªªªª ªªªª ªªªªª ª ª ªªªª ªªªªª XML ª ªª ª ª ª cxml1.2 ªª ª ª ªª ª cxml 1.1 t B2B Integration ªªªªªª w ª ªªª ª ªªªª ªªªªª ªªªªª ªªª XOCP RosettaNet ªªªª ªªªªª cxml WebLogic Integration t cxml ª ª ªª ªªªª ª ªªªª ªªªªª ªªª 4-4 B2B Integration cxml t
ªªªª ª ª ªªª ªªªª ª ª ªªª u ª ª ª ªªªª ª ª ªªª ~ WebLogic Integration Studio ªªª ªªª ªªªªªª ªª ª ª f u ªªªª ª ª ªªª ~ f Manipulate Business Message ªª ª ª f ªªªª ªªªªª Send Business Message ª ª ª ª f ª ª ªªª ~ ªªªª ª ª ªªª f Manipulate Business Message ªª ª ª f ªªªª ªªªªª v B2B Integration ªªªªªª B2B Integration cxml t 4-5
4 cxml ªªª ª ªª 4-6 B2B Integration cxml t
索引 C cxml DTD 3-7 ªªªªªªª 1-1 ªªª ª ª 1-4 ªªªªª 3-8 ª ª ªªª ªª ª ªªªª 3-14 ªªªªª ~ 3-5 ªªªª ªªªªªª 1-4 ªªªªª v 1-5 cxml API ª ª ªª 3-2 cxml ªªªª ªª ªª ª ª 2-1 W WebLogic Integration BPM ªªªªªªª ª ª ª 4-2 vvª ª ª 4-3 ª ª ª 4-2 ªªªª ª ªª ªªª 4-2 t ªªª ª 1-vi ªªª ªªª ª 1-vii ~ 1-vii ªªª ªªª ª ª ª ªªª ª ª 2-3 3-5 ªªª ª ª 2-3 1-4, 3-7 ªªªªe 1-5 ªªªªe 1-5 ªªªª ªªªªª 4-5 w 4-4 ªªªªªª ªªªªªª f ªªªª ªªªªª f 4-5 cxml ªª ª ªª ª ª 1-3 1-4, 3-7 B2B Integration cxml t I-1
I-2 B2B Integration cxml t