Author: objectiser
Date: 2011-01-07 09:13:12 -0500 (Fri, 07 Jan 2011)
New Revision: 1216
Added:
dsp/trunk/samples/example-deployer/
dsp/trunk/samples/example-deployer/build.xml
dsp/trunk/samples/example-deployer/hello_world.zip
dsp/trunk/samples/example-deployer/readme.txt
Log:
Changed way the example is distributed and built, to enable environment properties to be
changed by the user prior to building the example.
Added: dsp/trunk/samples/example-deployer/build.xml
===================================================================
--- dsp/trunk/samples/example-deployer/build.xml (rev 0)
+++ dsp/trunk/samples/example-deployer/build.xml 2011-01-07 14:13:12 UTC (rev 1216)
@@ -0,0 +1,65 @@
+<project name="dsp-example-deployer" default="build"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="build.dir" location="build"/>
+
+ <path id="compile-classpath">
+ <fileset dir="../../lib" includes="*.jar" />
+ <fileset dir="deployer/resources/WEB-INF/lib" includes="*.jar"
/>
+ </path>
+
+ <property name="compile-classpath"
refid="compile-classpath"/>
+
+ <target name="makewar" description="make war">
+
+ <mkdir dir="${build.dir}/war" />
+
+ <copy todir="${build.dir}/war" >
+ <fileset dir="deployer/resources" />
+ </copy>
+
+ <copy todir="${build.dir}/war/WEB-INF/lib" >
+ <fileset dir="../../lib" includes="dsp*.jar" />
+ </copy>
+
+ <copy todir="${build.dir}/war/WEB-INF/lib" >
+ <fileset dir="${build.dir}" includes="*.jar" />
+ </copy>
+
+ <jar destfile="${build.dir}/${ant.project.name}.war">
+ <fileset dir="${build.dir}/war" />
+ </jar>
+ </target>
+
+ <target name="buildprovider" >
+ <mkdir dir="${build.dir}/provider" />
+ <javac srcdir="provider/src"
destdir="${build.dir}/provider" debug="true">
+ <classpath>
+ <path refid="compile-classpath" />
+ <fileset dir="deployer/resources/WEB-INF/lib"
includes="*.jar" />
+ </classpath>
+ </javac>
+
+ <jar destfile="${build.dir}/dsp-example-provider.jar"
basedir="${build.dir}/provider"/>
+ </target>
+
+ <target name="builddeployer" >
+ <mkdir dir="${build.dir}/deployer" />
+ <javac srcdir="deployer/src"
destdir="${build.dir}/deployer" debug="true">
+ <classpath>
+ <path refid="compile-classpath" />
+ <fileset dir="deployer/resources/WEB-INF/lib"
includes="*.jar" />
+ <fileset dir="${build.dir}" includes="*.jar" />
+ </classpath>
+ </javac>
+
+ <jar destfile="${build.dir}/dsp-example-deployer.jar"
basedir="${build.dir}/deployer"/>
+ </target>
+
+ <target name="build"
depends="buildprovider,builddeployer,makewar">
+ </target>
+</project>
Added: dsp/trunk/samples/example-deployer/hello_world.zip
===================================================================
(Binary files differ)
Property changes on: dsp/trunk/samples/example-deployer/hello_world.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: dsp/trunk/samples/example-deployer/readme.txt
===================================================================
--- dsp/trunk/samples/example-deployer/readme.txt (rev 0)
+++ dsp/trunk/samples/example-deployer/readme.txt 2011-01-07 14:13:12 UTC (rev 1216)
@@ -0,0 +1,85 @@
+Example Deployer
+================
+
+This sample provides an example deployer that accepts a zip containing a WSDL definition,
and then makes a
+web service available using that interface. The operations performed on that WSDL
interface are implemented
+using an Example Service Provider that simply displays a message on the console, and
returns a fault response.
+
+Build the Example
+-----------------
+
+From the $DSP/samples/example-deployer folder, run the following command:
+
+ ant build
+
+If built successfully, this will create a war file in the build folder.
+
+
+
+Deploying the example to JBoss Application Server
+-------------------------------------------------
+
+1) Start the JBoss Application Server (default profile assumed)
+
+2) Install the Example Service Provider's Deployer Web App
+
+Copy the $DSP/samples/example-deployer/build/dsp-example-deployer.war into
$JBOSSAS/server/default/deploy
+
+
+Deploying the example to Apache Tomcat
+--------------------------------------
+
+1) Install the example service provider
+
+Copy the dsp-example-provider.jar into $CATALINA_HOME/lib
+
+2) Start the Apache Tomcat server
+
+NOTE: Make sure that the CATALINA_HOME environment variable is set correctly before
starting the server.
+
+3) Install the Example Service Provider's Deployer Web App
+
+Copy the dsp-example-deployer.war into $CATALINA_HOME/webapps
+
+
+
+Running the Example
+-------------------
+
+1) Deploy an Example WSDL
+
+Start a browser and enter the following URL:
http://localhost:8080/dsp-example-deployer/
+
+When the 'Dynamic Service Provider Example' page is displayed, requesting the web
service details, browse to the
+hello_world.zip contained in the samples folder. This zip contains a WSDL definition that
will be used to provide
+the web service implemented using the example dynamic service provider implementation.
+
+2) Send a message to the web service
+
+Using a suitable SOAP client, such as SOAPUI, send the following message to:
+http://127.0.0.1:8080/Quickstart_bpel_hello_worldWS/
+
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <TestPart>Hello World</TestPart>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+You should receive the following response:
+
+<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <SOAP-ENV:Body>
+ <SOAP-ENV:Fault>
+ <faultcode
xmlns:ns0="http://www.example.org">ns0:ExampleFault</faultcode>
+ <faultstring>Fault string, and possibly fault code, not
set</faultstring>
+ </SOAP-ENV:Fault>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+3) Undeploy the service
+
+Select the service in the undeploy section of the deployer's web page. This will
remove the web service
+associated with the Hello World web service.