[jboss-svn-commits] JBossWS SVN: r869 - in tags/jbossws-1.0.3.GA: docs/user-guide/project/en/modules/wsbpel src/test/resources/samples/wsbpel/hello/bpel

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 30 23:19:13 EDT 2006


Author: alex.guizar at jboss.com
Date: 2006-08-30 23:19:11 -0400 (Wed, 30 Aug 2006)
New Revision: 869

Modified:
   tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
   tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.bpel
   tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.wsdl
Log:
JBWS-868

Modified: tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
===================================================================
--- tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml	2006-08-31 01:44:01 UTC (rev 868)
+++ tags/jbossws-1.0.3.GA/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml	2006-08-31 03:19:11 UTC (rev 869)
@@ -58,31 +58,33 @@
       of the interfaces (message and port type elements) of the participants, not their possible 
       deployments.</para>
       
-    <programlisting>&lt;definitions targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
-  xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
-  xmlns:tns=&quot;http://jbpm.org/examples/hello&quot;
-  xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
+    <programlisting><![CDATA[<definitions targetNamespace="http://jbpm.org/examples/hello"
+  xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:tns="http://jbpm.org/examples/hello" 
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    
 
-  &lt;!-- <emphasis role="bold">carries the name of a person</emphasis> --&gt;
-  &lt;message name=&quot;nameMessage&quot;&gt;
-    &lt;part name=&quot;name&quot; type=&quot;xsd:string&quot;/&gt;
-  &lt;/message&gt;
+  <!-- carries the name of a person -->
+  <message name="NameMessage">
+    <part name="name" type="xsd:string"/>
+  </message>
 
-  &lt;!-- <emphasis role="bold">carries the greeting</emphasis> --&gt;
-  &lt;message name=&quot;greetingMessage&quot;&gt;
-    &lt;part name=&quot;greeting&quot; type=&quot;xsd:string&quot;/&gt;
-  &lt;/message&gt;
+  <!-- carries the greeting -->
+  <message name="GreetingMessage">
+    <part name="greeting" type="xsd:string"/>
+  </message>
 
-  &lt;!-- <emphasis role="bold">describes the interface presented to callers</emphasis> --&gt;
-  &lt;portType name=&quot;helloPT&quot;&gt;
-    &lt;operation name=&quot;sayHello&quot;&gt;
-      &lt;input message=&quot;tns:nameMessage&quot;/&gt;
-      &lt;output message=&quot;tns:greetingMessage&quot;/&gt;
-    &lt;/operation&gt;
-  &lt;/portType&gt;
+  <!-- describes the interface presented to callers -->
+  <portType name="HelloPT">
+    <operation name="sayHello">
+      <input message="tns:NameMessage"/>
+      <output message="tns:GreetingMessage"/>
+    </operation>
+  </portType>
 
-&lt;/definitions&gt;</programlisting>
 
+</definitions>]]></programlisting>
+
     <para>You already know how to implement this in Java. Let's jump to the BPEL way. The document 
       that defines our business process appears next. There are three major sections in it.</para>
       
@@ -103,52 +105,48 @@
         
     </itemizedlist>
     
-    <programlisting>&lt;process name=&quot;helloWorld&quot; 
-  targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
-  xmlns=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;
-  xmlns:tns=&quot;http://jbpm.org/examples/hello&quot;
-  xmlns:bpel=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;
-  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-  xsi:schemaLocation=&quot;http://schemas.xmlsoap.org/ws/2003/03/business-process/
-   http://schemas.xmlsoap.org/ws/2003/03/business-process/&quot;&gt;
+    <programlisting><![CDATA[<process name="HelloWorld" targetNamespace="http://jbpm.org/examples/hello"
+  xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+  xmlns:tns="http://jbpm.org/examples/hello"
+  xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
+                      http://schemas.xmlsoap.org/ws/2003/03/business-process/">
 
-  &lt;partnerLinks&gt;
-    &lt;!-- <emphasis role="bold">establishes the relationship with the caller agent</emphasis> --&gt;
-    &lt;partnerLink name=&quot;caller&quot; partnerLinkType=&quot;tns:helloPLT&quot; 
-                 myRole=&quot;service&quot;/&gt;
-  &lt;/partnerLinks&gt;
+  <partnerLinks>
+    <!-- establishes the relationship with the caller agent -->
+    <partnerLink name="Caller" partnerLinkType="tns:HelloPLT" myRole="service" />
+  </partnerLinks>
 
-  &lt;variables&gt;
-    &lt;!-- <emphasis role="bold">holds the incoming message</emphasis> --&gt;
-    &lt;variable name=&quot;request&quot; messageType=&quot;tns:nameMessage&quot;/&gt;
-    &lt;!-- <emphasis role="bold">holds the outgoing message</emphasis> --&gt;
-    &lt;variable name=&quot;response&quot; messageType=&quot;tns:greetingMessage&quot;/&gt;
-  &lt;/variables&gt;
+  <variables>
+    <!-- holds the incoming message -->
+    <variable name="request" messageType="tns:NameMessage" />
+    <!-- holds the outgoing message -->
+    <variable name="response" messageType="tns:GreetingMessage" />
+  </variables>
 
-  &lt;sequence&gt;
-  
-    &lt;!-- <emphasis role="bold">receive the name of a person</emphasis> --&gt;
-    &lt;receive partnerLink=&quot;caller&quot; portType=&quot;tns:helloPT&quot;
-             operation=&quot;sayHello&quot; variable=&quot;request&quot; 
-             createInstance=&quot;true&quot;/&gt;
-
-    &lt;!-- <emphasis role="bold">compose a greeting phrase</emphasis> --&gt;
-    &lt;assign&gt;
-      &lt;copy&gt;
-        &lt;from expression=&quot;concat('Hello, ',
-                          bpel:getVariableData('request', 'name'),
-                          '!')&quot;/&gt;
-        &lt;to variable=&quot;response&quot; part=&quot;greeting&quot;/&gt;
-      &lt;/copy&gt;
-    &lt;/assign&gt;
+  <sequence>
     
-    &lt;!-- <emphasis role="bold">reply with the greeting</emphasis> --&gt;
-    &lt;reply partnerLink=&quot;caller&quot; portType=&quot;tns:helloPT&quot;
-           operation=&quot;sayHello&quot; variable=&quot;response&quot;/&gt;
-           
-  &lt;/sequence&gt;
+    <!-- receive the name of a person -->
+    <receive operation="sayHello" partnerLink="Caller" portType="tns:HelloPT"
+      variable="request" createInstance="yes" />
+      
+    <!-- compose a greeting phrase -->
+    <assign>
+      <copy>
+        <from expression="concat('Hello, ', 
+                          bpel:getVariableData('request', 'name'), 
+                          '!')" />
+        <to variable="response" part="greeting" />
+      </copy>
+    </assign>
+    
+    <!-- reply with the greeting -->
+    <reply operation="sayHello" partnerLink="Caller" portType="tns:HelloPT"
+      variable="response" />
+  </sequence>
 
-&lt;/process&gt;</programlisting>
+</process>]]></programlisting>
 
     <para>Notice the <literal>caller</literal> partner link references a <literal>partnerLinkType
       </literal> artifact not introduced so far. Partner link types are WSDL extensibility elements
@@ -158,18 +156,18 @@
     <para>In order for the process definition to be complete, we must add the partner link type to
       the WSDL document presented earlier.</para>
       
-    <programlisting>&lt;definitions targetNamespace=&quot;http://jbpm.org/examples/hello&quot;
+    <programlisting><![CDATA[<definitions targetNamespace="http://jbpm.org/examples/hello"
   ...
-  xmlns:plt=&quot;http://schemas.xmlsoap.org/ws/2003/05/partner-link/&quot;&gt;
+  xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
 
-  &lt;!-- <emphasis role="bold">characterizes the relationship between the greeting process and its caller</emphasis> --&gt;
-  &lt;plt:partnerLinkType name=&quot;helloPLT&quot;&gt;
-    &lt;plt:role name=&quot;service&quot;&gt;
-      &lt;plt:portType name=&quot;tns:helloPT&quot;/&gt;
-    &lt;/plt:role&gt;
-  &lt;/plt:partnerLinkType&gt;
+  <!-- characterizes the relationship between the greeting process and its caller -->
+  <plt:partnerLinkType name="HelloPLT">
+    <plt:role name="service">
+      <plt:portType name="tns:HelloPT"/>
+    </plt:role>
+  </plt:partnerLinkType>
   
-&lt;/definitions&gt;</programlisting>
+</definitions>]]></programlisting>
   
   </section>
   
@@ -195,16 +193,15 @@
       </note>
 
     <para>Before the process can be enacted, its definition must be stored in the jBPM database.
-      To do so, package your BPEL process and related WSDL interfaces in an archive. Afterwards,
-      submit the archive to the jBPM service.</para>
+      To do so, zip your BPEL process and related WSDL interfaces. Afterwards, submit the resulting
+      archive to the jBPM service.</para>
       
-    <programlisting><![CDATA[<jar destfile="${build.dir}/${app.name}.par">
-  <fileset dir="${bpel.dir}" />
-  <zipfileset dir="${resources.dir}"
-              prefix="META-INF"
-              includes="bpel-definition.xml" />
-</jar>
+    <programlisting><![CDATA[<!-- Package the BPEL process and related WSDL interfaces -->
+<zip destfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip">
+  <fileset dir="${build.test.dir}/resources/samples/wsbpel/hello/bpel" />
+</zip>
 
+<!-- Submit the process archive to the jBPM service -->
 <get dest="${build.dir}/deploy-def.html"
      src="http://localhost:8080/jbpm/deploy?archive=file://${build.dir}/${app.name}.par" />]]></programlisting>
       
@@ -220,7 +217,7 @@
 
 </bpelDefinition>]]></programlisting>
 
-    <tip><para>The definition descriptor can also reference external documents.</para></tip>
+    <tip><para>The definition descriptor can also reference external WSDL documents.</para></tip>
       
   </section>
     
@@ -253,10 +250,10 @@
       
     <programlisting><![CDATA[<configuration xmlns="http://www.jboss.org/jbossws-tools">
   <global>
-    <package-namespace package="org.jbpm.bpel.tutorial.hello"
+    <package-namespace package="org.jboss.test.ws.samples.wsbpel.hello"
       namespace="http://jbpm.org/examples/hello" />
   </global>
-  <wsdl-java file="src/main/resources/WEB-INF/wsdl/service.wsdl">
+  <wsdl-java file="wstools/resources/samples/wsbpel/hello/WEB-INF/wsdl/service.wsdl">
     <mapping file="jaxrpc-mapping.xml" />
   </wsdl-java>
 </configuration>]]></programlisting>

Modified: tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.bpel
===================================================================
--- tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.bpel	2006-08-31 01:44:01 UTC (rev 868)
+++ tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.bpel	2006-08-31 03:19:11 UTC (rev 869)
@@ -8,7 +8,7 @@
                       http://schemas.xmlsoap.org/ws/2003/03/business-process/">
 
   <partnerLinks>
-    <!-- realizes the abstract relationship with the caller -->
+    <!-- establishes the relationship with the caller agent -->
     <partnerLink name="Caller" partnerLinkType="tns:HelloPLT" myRole="service" />
   </partnerLinks>
 
@@ -20,10 +20,12 @@
   </variables>
 
   <sequence>
-    <!-- receive a message carrying the name of a person -->
+    
+    <!-- receive the name of a person -->
     <receive operation="sayHello" partnerLink="Caller" portType="tns:HelloPT"
       variable="request" createInstance="yes" />
-    <!-- compose a greeting phrase containing the name -->
+      
+    <!-- compose a greeting phrase -->
     <assign>
       <copy>
         <from expression="concat('Hello, ', 
@@ -32,7 +34,8 @@
         <to variable="response" part="greeting" />
       </copy>
     </assign>
-    <!-- reply with a message carrying the greeting -->
+    
+    <!-- reply with the greeting -->
     <reply operation="sayHello" partnerLink="Caller" portType="tns:HelloPT"
       variable="response" />
   </sequence>

Modified: tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.wsdl
===================================================================
--- tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.wsdl	2006-08-31 01:44:01 UTC (rev 868)
+++ tags/jbossws-1.0.3.GA/src/test/resources/samples/wsbpel/hello/bpel/hello.wsdl	2006-08-31 03:19:11 UTC (rev 869)
@@ -10,7 +10,7 @@
                       http://schemas.xmlsoap.org/ws/2003/05/partner-link/ 
                       http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
   
-  <!-- characterizes the relationship between the process and its caller -->
+  <!-- characterizes the relationship between the greeting process and its caller -->
   <plt:partnerLinkType name="HelloPLT">
     <plt:role name="service">
       <plt:portType name="tns:HelloPT"/>




More information about the jboss-svn-commits mailing list