Java 人生

java (Java EE)&Linux

BlogJava 首页 新随笔 联系 聚合 管理
  15 Posts :: 2 Stories :: 5 Comments :: 0 Trackbacks

一.    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

posted on 2006-04-18 20:33 jinmy liao 阅读(931) 评论(0)  编辑  收藏 所属分类: SOA

只有注册用户登录后才能发表评论。


网站导航: