一.???
在
servicemix
中實現
JBI
組件調用
BPEL
的步驟
.
1.???????
建立
BPEL
流程,
BPEL
是跟
wsdl(web services)
通信的
.
2.???????
創建一個
pxe-system.xml
文件,描述怎麼樣綁定
BPEL
流程到實際的
JBI
組件中。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<system-descriptor name="AsyncProcessSU"
? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
? xsi:schemaLocation="http://www.fivesight.com/pxe/system-descriptor/ http://www.fivesight.com/pxe/system-descriptor/"
? wsdlUri="uri:/AsyncProcess.wsdl"
? xmlns="http://www.fivesight.com/pxe/system-descriptor/"
? xmlns:proc="uri:com.bptest.process"
? xmlns:resp="uri:com.bptest.responder">
? <channels>
??? <channel name="inboundChannel" />
??? <channel name="callbackChannel" />
??? <channel name="outboundChannel" />
? </channels>
? <services>
??? <service name="ProcessSVC" provider="uri:jbi" >
????? <properties>
??????? <property name="namespace"
???????? value="uri:fivesight.com/examples/AsyncProcessJBI" />
????? </properties>
????? <imports>
??????? <!-- The following port will be registered as a JBI service endpoint
???????
?????{uri:fivesight.com/examples/AsyncProcessJBI:ProcessSVC, ProcessPORT}
????????? -->
??????? <port name="ProcessPORT" type="proc:ProcessPT" channel-ref="inboundChannel"/>
??????? <!-- The following port will be registered as a JBI service endpoint
????
????????{uri:fivesight.com/examples/AsyncProcessJBI:ProcessSVC, CallbackPORT}
????????? -->
??????? <port name="CallbackPORT" type="resp:CallbackPT" channel-ref="callbackChannel"/>
????? </imports>
??? </service>
??? <service name="ResponderSVC" provider="uri:jbi" >
????? <properties>
??????? <property name="namespace"
???????? value="uri:fivesight.com/examples/AsyncProcessJBI" />
????? </properties>
????? <exports>
??????? <!-- The following port will invoke JBI service endpoint
???????????? {uri:fivesight.com/examples/AsyncProcessJBI:ResponderSVC, ResponderPORT}
????????? -->
??????? <port name="ResponderPORT" type="resp:ResponderPT" channel-ref="outboundChannel"/>
????? </exports>
??? </service>
??? <service name="ProcessSync.BpelService" provider="uri:bpel">
????? <properties>
??????? <property name="compiledProcess" value="AsyncProcess.cbp"/>
????? </properties>
????? <imports>
??????? <port name="AsyncResponder.Responder" type="resp:ResponderPT" channel-ref="outboundChannel"/>
????? </imports>
????? <exports>
??????? <port name="Client.Process" type="proc:ProcessPT" channel-ref="inboundChannel"/>
??????? <port name="AsyncResponder.Caller" type="resp:CallbackPT" channel-ref="callbackChannel"/>
????? </exports>
??? </service>
? </services>
</system-descriptor>
?
?
3.???????
把
pxe-system.xml
和
BPEL
、
wsdl
文件打包成
pxe.sar
文件
.
4.???????
JBI
發佈組件是一個
zip
文件,所以把剛才的
.sar
在打包成
.zip
5.???????
創建
jbi.xml
文件
.
?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jbi version="1"
? xsi:schemaLocation="http://java.sun.com/xml/ns/jbi? ./jbi.xsd"
? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
? xmlns="http://java.sun.com/xml/ns/jbi">
?
? <service-assembly>
??? <identification>
????? <name>AsyncProcessSA</name>
????? <description>Service Assembly containing just the BPEL deployment.</description>
??? </identification>
??? <service-unit>
????? <identification>
??????? <name>AsyncProcessSU</name>
??????? <description>BPEL Service Unit</description>
????? </identification>
????? <target>
??????? <artifacts-zip>AsyncProcess-su.zip</artifacts-zip>
??????? <component-name>PxeBpelEngine</component-name>
????? </target>
??? </service-unit>
? </service-assembly>
</jbi>
6.
把
jbi.xml
和第五步得到的
zip
一起打包成一個
service Assembly(SA)
7.
在創建一個
servicemix.xml
文件用來運行
JBI container