Author: alex.guizar(a)jboss.com
Date: 2007-02-09 20:52:14 -0500 (Fri, 09 Feb 2007)
New Revision: 2329
Added:
branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
Modified:
branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template
Log:
JBWS-867
Modified: branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
===================================================================
--- branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-09
23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-10
01:52:14 UTC (rev 2329)
@@ -83,8 +83,8 @@
</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>
+ <para>The document that describes our business behavior appears below. There
are three major
+ sections in it.</para>
<itemizedlist>
@@ -182,30 +182,39 @@
(<ulink
url="http://jbpm.org/gop">GOP</ulink>) foundation in
jBPM maintains past and present
graph state in a database.</para>
- <para>Installing the jBPM service in JBoss AS is a prerrequisite. The samples
suite fetches
- a preconfigured service archive from the JBoss repository and installs it
automatically.
- Please refer to the jBPM BPEL <ulink
+ <para>Installing the jBPM service in JBoss AS is a prerrequisite. The samples
suite installs
+ a preconfigured service archive automatically. Please refer to the jBPM BPEL
<ulink
url="http://docs.jboss.com/jbpm/bpel/getstarted.html#getstarted.setu...
guide</ulink>
for details on how to customize the service to match your requirements and
deployment
environment. The sample code that accompanies this chapter was developed and tested
with
- jBPM BPEL version 1.1.Beta2.</para>
+ jBPM BPEL version 1.1.Beta3.</para>
<note><para>The preconfigured jBPM service comes with an <ulink
url="http://www.hsqldb.org/">
HSQL</ulink> database, useful for development purposes. In production, you
can switch to
the database of your choice.</para></note>
<para>Before the process can serve requests, its definition must be stored in
the jBPM database.
- jBPM BPEL supplies an ant task, <literal>deployprocess</literal>, to
assist here. The input of
- <literal>deployprocess</literal> is a zip file containing your BPEL
process and related WSDL
- interfaces. The task submits the zip file to the jBPM service for
storage.</para>
+ The unit test setup code shown below performs this operation. This code comes from
+ class
<classname>org.jboss.test.ws.jaxrpc.samples.wsbpel.JbpmBpelTestSetup</classname>.
+ The argument is a zip file containing your BPEL process and related WSDL
+ interfaces. The <literal>submitRequest</literal> method submits the zip
file to a web module
+ deployed as part of the jBPM BPEL service. The web module connects to the database
and
+ stores the process definition.</para>
- <programlisting><![CDATA[<!-- Zip 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>
+ <programlisting><![CDATA[public static void deployProcess(File processFile)
throws Exception
+{
+ // format file component
+ String file = getJbpmBpelDeployContext() + "?processfile=" +
URLEncoder.encode(processFile.toURI().toString(), "UTF-8");
-<!-- Store the process definition in the jBPM database -->
-<storeprocess
processfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip"
/>]]></programlisting>
+ // create target URL
+ URL targetUrl = new URL("http", JBossWSTestHelper.getServerHost(),
getServerHttpPort(), file);
+
+ // submit process deploy request
+ int responseCode = submitRequest(targetUrl);
+
+ if (responseCode != HttpURLConnection.HTTP_OK)
+ throw new IOException("could not deploy process: " + processFile);
+}]]></programlisting>
<para>The file <literal>bpel-definition.xml</literal> tells the
location of the BPEL and WSDL
documents inside the archive.</para>
@@ -236,25 +245,13 @@
BPEL supplies a tool that generates SOAP 1.1 binding and service elements required
for
deploying the web service provided by the process.</para>
- <programlisting><![CDATA[<!-- Define the servicegen ant task -->
-<taskdef resource="org/jbpm/bpel/ant/tasks.properties"
format="properties">
- <classpath>
- <path location="${common.resources}" />
- <path refid="client.classpath" />
- <path location="${jboss.lib}/dom4j.jar" />
- <path location="${jboss.server.lib}/commons-collections.jar" />
- <path location="${jboss.server.deploy.jbpmbpel}" />
- <fileset dir="${jboss.server.deploy.jbpmbpel}">
- <include name="jbpm*.jar" />
- <include name="commons-lang*.jar" />
- <include name="jaxen*.jar" />
- </fileset>
- </classpath>
+ <programlisting><![CDATA[<!-- generate wsdl binding and service
definitions for bpel processes -->
+<taskdef name="servicegen"
classname="org.jbpm.bpel.ant.ServiceGeneratorTask">
+ <classpath refid="jbpm.bpel.classpath"/>
</taskdef>
-
-<!-- Generate binding and service elements -->
-<servicegen
processfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip"
-
outputdir="${build.test.dir}/wstools/resources/samples/wsbpel/hello/WEB-INF/wsdl"
/>]]></programlisting>
+<servicegen
processfile="${tests.output.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip"
+
outputdir="${tests.output.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl"
+ bindingfile="hello-binding-.wsdl" servicefile="hello-service.wsdl"
/>]]></programlisting>
<para>The generated WSDL can be passed to
<literal>wstools</literal>. Use the following
configuration.</para>
@@ -264,7 +261,7 @@
<package-namespace
package="org.jboss.test.ws.jaxrpc.samples.wsbpel.hello"
namespace="http://jbpm.org/examples/hello" />
</global>
- <wsdl-java
file="wstools/resources/samples/wsbpel/hello/WEB-INF/wsdl/service.wsdl">
+ <wsdl-java
location="wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl/hello-service.wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>
</configuration>]]></programlisting>
@@ -277,7 +274,7 @@
process variables directly.</para>
<para>Nevertheless, the Java mapping artifacts still must be present for the
JSR-109
- deployment to be valid. Note that the supplied service implementation bean has
empty methods
+ deployment to be valid. Notice the supplied service implementation bean has empty
methods
only. The BPEL process specifies the behavior instead.</para>
</note>
@@ -309,7 +306,8 @@
<programlisting><bpelApplication name="HelloWorld"
xmlns="http://jbpm.org/bpel" /></programlisting>
- <note><para>This name will be used to retrieve the process definition
from the jBPM database.</para></note>
+ <note><para>This name will be used to retrieve the process definition
from the jBPM database.
+ It must match the process name in your BPEL document.</para></note>
</section>
@@ -325,9 +323,9 @@
</link>.</para>
<programlisting><![CDATA[InitialContext iniCtx = getInitialContext();
-service = (HelloWorldService)iniCtx.lookup("java:comp/env/service/BpelHello");
+helloService =
(HelloWorldService)iniCtx.lookup("java:comp/env/service/BpelHello");
-Greeter proxy = service.getGreeterPort();
+Greeter proxy = helloService.getGreeterPort();
String greeting = proxy.sayHello("Popeye");
assertEquals("Hello, Popeye!", greeting);]]></programlisting>
Added: branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
===================================================================
(Binary files differ)
Property changes on:
branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template
===================================================================
--- branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template 2007-02-09
23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template 2007-02-10
01:52:14 UTC (rev 2329)
@@ -44,6 +44,7 @@
<!ENTITY ch-wssecurity SYSTEM
"modules/wssecurity/wssecurity.xml">
<!ENTITY ch-wsaddressing SYSTEM
"modules/wsaddressing/wsaddressing.xml">
<!ENTITY ch-wseventing SYSTEM
"modules/wseventing/wseventing.xml">
+<!ENTITY ch-wsbpel SYSTEM "modules/wsbpel/wsbpel.xml">
<!ENTITY ch-wstransaction SYSTEM
"modules/wstransaction/wstransaction.xml">
<!ENTITY ch-xmlregistry SYSTEM
"modules/xmlregistry/xmlregistry.xml">
<!ENTITY appendix-a SYSTEM "modules/appendix-a.xml">
@@ -77,6 +78,7 @@
<para>Web Service Lead - Thomas Diesler</para>
<para>WS-Security, WSTools - Jason Greene</para>
<para>WS-Eventing, Standards - Heiko Braun</para>
+ <para>WS-BPEL - Alejandro Guizar</para>
</preface>
@@ -96,6 +98,7 @@
&ch-wssecurity;
&ch-wsaddressing;
&ch-wseventing;
+ &ch-wsbpel;
&ch-wstransaction;
&ch-xmlregistry;
&appendix-a;