diff options
Diffstat (limited to 'sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel')
20 files changed, 1171 insertions, 0 deletions
diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/README b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/README new file mode 100644 index 0000000000..c84dba22f4 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/README @@ -0,0 +1,31 @@ +Hello World BPEL Sample +====================================== +This sample demonstrates an SCA service implemented by a BPEL process. + +See http://tuscany.apache.org/documentation-2x/20-beta-samples-documentation.html +for more information + +=============== OLD INFO ====================== + +mkdir target\classes +mkdir target\wsdl2java-source +java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl +java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl +unzip ..\..\lib\ode-dao-jpa-ojpa-derby-1.1.zip -d target\database +javac -d target\classes -cp target\classes;..\..\lib\tuscany-sca-manifest.jar -sourcepath src\main\java;target\wsdl2java-source -target 1.5 -g -source 1.5 src\main\java\helloworld\BPELClient.java +copy src\main\resources\* target\classes +java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes;target\database helloworld.BPELClient + +and on *nix do + +mkdir target/classes +mkdir target/wsdl2java-source +java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl +java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl +unzip ../../lib/ode-dao-jpa-ojpa-derby-1.1.zip -d target/database +javac -d target/classes -cp target/classes;../../lib/tuscany-sca-manifest.jar -sourcepath src/main/java;target/wsdl2java-source -target 1.5 -g -source 1.5 src/main/java/helloworld/BPELClient.java +cp src/main/resources/* target/classes +java -cp ../../lib/tuscany-sca-manifest.jar:target/classes:target/database helloworld.BPELClient + +The sample will start an embedded BPEL engine, deploy a process and invoke it. + diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/build.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/build.xml new file mode 100644 index 0000000000..d94388f466 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/build.xml @@ -0,0 +1,95 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="sample-implementation-bpel-helloworld-contribution" default="compile"> + <property name="test.class" value="helloworld.BPELClient" /> + <property name="test.jar" value="sample-implementation-bpel-helloworld-contribution.jar" /> + <property name="manifest.jar" value="../../lib/tuscany-sca-manifest.jar" /> + + <target name="init"> + <mkdir dir="target/classes"/> + <mkdir dir="target/wsdl2java-source"/> + </target> + + <target name="generate-wsdl" depends="init"> + <java classname="org.apache.tuscany.sdo.generate.XSD2JavaGenerator" fork="true"> + <arg value="-targetDirectory"/> + <arg value="target/wsdl2java-source"/> + <arg value="-prefix"/> + <arg value="HelloWorld"/> + <arg value="-noContainment"/> + <arg value="-noUnsettable"/> + <arg value="src/main/resources/helloworld.wsdl"/> + + <classpath> + <pathelement location="${manifest.jar}"/> + </classpath> + </java> + + <java classname="org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator" fork="true"> + <arg value="-targetDirectory"/> + <arg value="target/wsdl2java-source"/> + <arg value="src/main/resources/helloworld.wsdl"/> + + <classpath> + <pathelement location="${manifest.jar}"/> + </classpath> + </java> + </target> + + <target name="unzip-ode-db" depends="init"> + <unzip src="../../lib/ode-dao-jpa-ojpa-derby-1.3.2.zip" dest="target/database"/> + </target> + + <target name="compile" depends="init,generate-wsdl,unzip-ode-db"> + <javac destdir="target/classes" debug="on" source="1.5" target="1.5"> + <src path="src/main/java"/> + <src path="target/wsdl2java-source"/> + <classpath> + <pathelement location="${manifest.jar}"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/${test.jar}" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run"> + <java classname="${test.class}" fork="true"> + <!-- jvmarg value="-Xdebug"/ --> + <!-- jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"/ --> + <classpath> + <pathelement location="target/classes"/> + <pathelement location="target/database"/> + <pathelement location="${manifest.jar}"/> + </classpath> + </java> + </target> + + <target name="clean"> + <delete includeemptydirs="true"> + <fileset dir="target"/> + </delete> + </target> + +</project> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.png b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.png Binary files differnew file mode 100644 index 0000000000..5f53a3c5d1 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.png diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.svg b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.svg new file mode 100644 index 0000000000..5a98f1a07c --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/helloworld-bpel.svg @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1052.3622" + height="744.09448" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.45.1" + sodipodi:docbase="C:\simon\tuscany\java-panic\sca\samples\helloworld-bpel" + sodipodi:docname="helloworld-bpel.svg" + version="1.0" + inkscape:export-filename="C:\simon\tuscany\java-panic\sca\samples\helloworld-bpel\helloworld-bpel.png" + inkscape:export-xdpi="52.84" + inkscape:export-ydpi="52.84" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="519.38407" + inkscape:cy="414.63224" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="1141" + inkscape:window-height="676" + inkscape:window-x="360" + inkscape:window-y="147" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="g2997" + transform="matrix(0.991389,0,0,1,2.215655,0)"> + <rect + rx="13.79423" + ry="12.692303" + y="192.00233" + x="258.3114" + height="299.99988" + width="446.72086" + id="rect2067" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.00866628;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot2954" + xml:space="preserve"><flowRegion + id="flowRegion2956"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect2958" /></flowRegion><flowPara + id="flowPara2960">helloworldws</flowPara></flowRoot> </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.77353811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2988" + width="137.03178" + height="139.37514" + x="433.16025" + y="308.26868" + rx="8.2887468" + ry="11.562291" /> + <flowRoot + xml:space="preserve" + id="flowRoot2966" + transform="translate(183.89697,109.51481)"><flowRegion + id="flowRegion2968"><rect + id="rect2970" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2972">HelloWorld</flowPara><flowPara + id="flowPara1883">Service</flowPara><flowPara + id="flowPara1885">Component</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 414.90867,339.0146 L 448.24371,339.0146 L 454.30462,352.14658 L 447.23356,364.26842 L 414.90867,364.26842 L 422.48482,352.14658 L 414.90867,339.0146 z " + id="path3017" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 226.73064,320.75315 L 293.91185,320.75315 L 306.1266,352.82797 L 291.87606,382.43553 L 226.73064,382.43553 L 241.99911,352.82797 L 226.73064,320.75315 z " + id="path1892" /> + <flowRoot + xml:space="preserve" + id="flowRoot1894" + transform="translate(-37.47944,122.8324)" + style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans"><flowRegion + id="flowRegion1896"><rect + id="rect1898" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" + style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans" /></flowRegion><flowPara + id="flowPara1900">HelloWorld</flowPara><flowPara + id="flowPara1906">Web</flowPara><flowPara + id="flowPara1904">Service</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 305.71429,353.3802 L 422.85714,351.95163" + id="path1910" + inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\helloworld-ws-service\helloworld-ws-service.png" + inkscape:export-xdpi="52.84" + inkscape:export-ydpi="52.84" /> + <rect + style="opacity:1;fill:#e4a637;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.03563392;stroke-miterlimit:4;stroke-dasharray:6.21380369, 1.03563395;stroke-dashoffset:0;stroke-opacity:1" + id="rect2179" + width="107.35972" + height="30.216856" + x="454.17728" + y="404.70035" + rx="1.1482089" + ry="1.0659764" /> + <flowRoot + xml:space="preserve" + id="flowRoot3152" + transform="matrix(0.8110318,0,0,0.9349147,74.607827,34.581873)"><flowRegion + id="flowRegion3154"><rect + id="rect3156" + width="114.28571" + height="12.857142" + x="450.71429" + y="376.23734" /></flowRegion><flowPara + id="flowPara3158">implementation.bpel</flowPara></flowRoot> <text + xml:space="preserve" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="466.42856" + y="423.38019" + id="text3160"><tspan + sodipodi:role="line" + id="tspan3162" + x="466.42856" + y="423.38019">helloworld.bpel</tspan></text> + </g> +</svg> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml new file mode 100644 index 0000000000..e90928e2ab --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-samples</artifactId> + <version>2.0-Beta2-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <packaging>zip</packaging> + <artifactId>sample-implementation-bpel-helloworld-contribution</artifactId> + <name>Apache Tuscany SCA Sample implementation.bpel HelloWorld Contribution</name> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>2.0-Beta2-SNAPSHOT</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + <plugins> + + <plugin> + <!-- plugin to support zip packaging for SCA contributions --> + <groupId>org.apache.tuscany.maven.plugins</groupId> + <artifactId>maven-zip-plugin</artifactId> + <version>alpha2</version> + <extensions>true</extensions> + </plugin> + + <!-- plugin to support using mvn tuscany:run to run this contribution --> + <plugin> + <groupId>org.apache.tuscany.maven.plugins</groupId> + <artifactId>maven-tuscany-plugin</artifactId> + <version>2.0-Beta2-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-bpel-runtime</artifactId> + <version>2.0-Beta2-SNAPSHOT</version> + </dependency> + </dependencies> + </plugin> + + </plugins> + </build> +</project> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/java/helloworld/Hello.java b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/java/helloworld/Hello.java new file mode 100644 index 0000000000..dbd3854d7c --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/java/helloworld/Hello.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package helloworld; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface Hello { + + String hello(String name); + +} diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..4a56523adb --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:sample="http://bpel"> + <deployable composite="sample:bpel"/> +</contribution>
\ No newline at end of file diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.bpel b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.bpel new file mode 100644 index 0000000000..d58768adfa --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.bpel @@ -0,0 +1,80 @@ +<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<process name="HelloWorld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://testing/"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+ <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://testing/"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="helloMessage" messageType="test:HelloMessage"/>
+ <variable name="helloMessageResponse" messageType="test:HelloMessageResponse"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessage"
+ createInstance="yes"/>
+
+ <assign name="assign1">
+ <copy>
+ <!-- from>concat($helloMessage.TestPart/test:message/text(), ' World')</from -->
+ <from>concat($helloMessage.TestPart/test:arg0/text(), ' World')</from>
+ <!-- from>concat('Hello ', 'world')</from -->
+ <to variable="tmpVar"/>
+ </copy>
+ <!-- Initialize the response -->
+ <copy>
+ <from>
+ <literal>
+ <test:helloResponse>
+ <test:messageResponse>Dummy</test:messageResponse>
+ </test:helloResponse>
+ </literal>
+ </from>
+ <to variable="helloMessageResponse" part="TestResponse"/>
+ </copy>
+ <copy>
+ <from variable="tmpVar"/>
+ <to>$helloMessageResponse.TestResponse/test:messageResponse</to>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessageResponse"/>
+ </sequence>
+</process>
diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.composite b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..08350e8417 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.composite @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://bpel" + xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld" + name="bpel"> + + <component name="HelloworldComponent"> + <implementation.bpel process="hns:HelloWorld"/> + </component> + +</composite> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.wsdl b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..cf966264ef --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/helloworld.wsdl @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<wsdl:definitions name="helloworld" + targetNamespace="http://testing/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://testing/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" + xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> + + <wsdl:types> + <schema elementFormDefault="qualified" + targetNamespace="http://testing/" + xmlns="http://www.w3.org/2001/XMLSchema"> + + <element name="hello"> + <complexType> + <sequence> + <element name="message" type="xsd:string"/> + </sequence> + </complexType> + </element> + + <element name="helloResponse"> + <complexType> + <sequence> + <element name="messageResponse" type="xsd:string"/> + </sequence> + </complexType> + </element> + </schema> + </wsdl:types> + + <wsdl:message name="HelloMessage"> + <wsdl:part element="tns:hello" name="TestPart"/> + </wsdl:message> + + <wsdl:message name="HelloMessageResponse"> + <wsdl:part element="tns:helloResponse" name="TestResponse"/> + </wsdl:message> + + <wsdl:portType name="HelloPortType"> + <wsdl:operation name="hello"> + <wsdl:input message="tns:HelloMessage" name="TestIn"/> + <wsdl:output message="tns:HelloMessageResponse" name="TestOut"/> + </wsdl:operation> + </wsdl:portType> + + + <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="hello"> + <wsdlsoap:operation soapAction=""/> + <wsdl:input name="TestIn"> + <wsdlsoap:body use="literal"/> + </wsdl:input> + <wsdl:output name="TestOut"> + <wsdlsoap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="HelloService"> + <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> + <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="HelloPartnerLinkType"> + <plnk:role name="me" portType="tns:HelloPortType"/> + <plnk:role name="you" portType="tns:HelloPortType"/> + </plnk:partnerLinkType> +</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/log4j.properties b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/log4j.properties new file mode 100644 index 0000000000..8649a71550 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/src/main/resources/log4j.properties @@ -0,0 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Set root logger level to WARN and its only appender to CONSOLE +log4j.rootLogger=OFF, CONSOLE + +# log4j properties to work with commandline tools. +log4j.category.org.mortbay=OFF +log4j.category.org.hibernate.type=OFF +log4j.category.org.objectweb=OFF +log4j.category.org.apache.ode.sql=OFF +log4j.category.org.apache.ode.axis2=OFF +log4j.category.org.apache.ode.bpel.engine=OFF +log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF +log4j.category.org.apache.ode.bpel.epr=OFF +log4j.category.org.apache.openjpa.kernel=OFF + +# Console appender +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n
\ No newline at end of file diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/README b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/README new file mode 100644 index 0000000000..2576b0ff13 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/README @@ -0,0 +1,6 @@ +Hello World BPEL WebApp Sample
+======================================
+This sample demonstrates an SCA service implemented by a BPEL process.
+
+See http://tuscany.apache.org/documentation-2x/20-beta-samples-documentation.html
+for more information
\ No newline at end of file diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml new file mode 100644 index 0000000000..b87dd6963b --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-samples</artifactId>
+ <version>2.0-Beta2-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>sample-implementation-bpel-helloworld-webapp</artifactId>
+ <packaging>war</packaging>
+ <name>Apache Tuscany SCA Sample implementation.bpel Helloworld WebApp</name>
+
+ <properties>
+ <tuscany.version>2.0-Beta2-SNAPSHOT</tuscany.version>
+ <jetty.version>6.1.18</jetty.version>
+ </properties>
+
+ <dependencies>
+ <!-- TUSCANY DEPENDENCIES -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-web-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-bpel-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- JUNIT DEPENDENCY FOR TESTING -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- JETTY DEPENDENCIES FOR TESTING -->
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-management</artifactId>
+ <version>${jetty.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>helloworld-bpel</finalName>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-jpa-ojpa-derby</artifactId>
+ <version>1.1.1</version>
+ <type>zip</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ <includes>**/*</includes>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.18</version>
+ <configuration>
+ <contextPath>helloworld-bpel</contextPath>
+ <stopKey>foo</stopKey>
+ <stopPort>9999</stopPort>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-jetty</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ <daemon>true</daemon>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8085</port>
+ </connector>
+ </connectors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/java/sample/HelloworldService.java b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/java/sample/HelloworldService.java new file mode 100644 index 0000000000..c1a50d9be5 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/java/sample/HelloworldService.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package sample; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloworldService { + + String hello(String name); + +} diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.bpel b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.bpel new file mode 100644 index 0000000000..f1e8895f76 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.bpel @@ -0,0 +1,66 @@ +<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<process name="HelloWorld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="test:HelloMessage"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <assign name="assign1">
+ <copy>
+ <from>concat('Hello ', $myVar.TestPart/test:message/text())</from>
+ <to variable="tmpVar"/>
+ </copy>
+ <copy>
+ <from>$tmpVar</from>
+ <to>$myVar.TestPart/test:message</to>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+</process>
diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.wsdl b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..46cf381577 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/resources/helloworld.wsdl @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<wsdl:definitions + targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" + xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> + + <wsdl:types> + <schema elementFormDefault="qualified" + targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl" + xmlns="http://www.w3.org/2001/XMLSchema"> + + <element name="hello"> + <complexType> + <sequence> + <element name="message" type="xsd:string"/> + </sequence> + </complexType> + </element> + </schema> + </wsdl:types> + + <wsdl:message name="HelloMessage"> + <wsdl:part element="tns:hello" name="TestPart"/> + </wsdl:message> + + <wsdl:portType name="HelloPortType"> + <wsdl:operation name="hello"> + <wsdl:input message="tns:HelloMessage" name="TestIn"/> + <wsdl:output message="tns:HelloMessage" name="TestOut"/> + </wsdl:operation> + </wsdl:portType> + + + <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="hello"> + <wsdlsoap:operation soapAction=""/> + <wsdl:input name="TestIn"> + <wsdlsoap:body use="literal"/> + </wsdl:input> + <wsdl:output name="TestOut"> + <wsdlsoap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="HelloService"> + <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> + <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="HelloPartnerLinkType"> + <plnk:role name="me" portType="tns:HelloPortType"/> + <plnk:role name="you" portType="tns:HelloPortType"/> + </plnk:partnerLinkType> +</wsdl:definitions>
\ No newline at end of file diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..3d36adadeb --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" + xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld" + targetNamespace="http://sample" + name="helloworld-bpel"> + + <component name="WebComponent"> + <implementation.web web-uri=""/> + <reference name="service" target="HelloworldComponent"> + <interface.java interface="sample.HelloworldService"/> + </reference> + </component> + + <component name="HelloworldComponent"> + <implementation.bpel process="hns:HelloWorld"/> + </component> + +</composite> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..bf01a7b759 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<web-app version="2.4" + xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > + + <display-name>helloworld-bpel</display-name> + + <filter> + <filter-name>tuscany.helloworld-bpel</filter-name> + <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>tuscany.helloworld-bpel</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <welcome-file-list id="WelcomeFileList"> + <welcome-file>hello.jsp</welcome-file> + </welcome-file-list> + +</web-app> diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/hello.jsp b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..c52d7b1cb2 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
+
+<sca:reference name="service" type="sample.HelloworldService" />
+
+<html>
+ <body >
+
+ <h2>helloworld-bpel</h2>
+
+ Calling HelloworldService sayHello("world") returns:
+
+ <p>
+
+ <%= service.hello("world") %>
+
+ </body>
+</html>
diff --git a/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/pom.xml b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/pom.xml new file mode 100644 index 0000000000..6901855d3f --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta2/samples/learning-more/implementation-bpel/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-samples</artifactId> + <version>2.0-Beta2-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>tuscany-samples-implememtation-bpel</artifactId> + <packaging>pom</packaging> + <name>Apache Tuscany SCA Implementation BPEL Samples</name> + + <profiles> + <profile> + <id>default</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>helloworld-bpel-contribution</module> + <module>helloworld-bpel-webapp</module> + </modules> + </profile> + </profiles> +</project> |