distribution packaging for ode-tomee-server similar to axis2 and jbi
Project: http://git-wip-us.apache.org/repos/asf/ode/repo Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/7750a155 Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/7750a155 Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/7750a155 Branch: refs/heads/master Commit: 7750a155e5e3170cbd76ed58b5827b5e88578fa3 Parents: 60b59dc Author: sathwik <[email protected]> Authored: Wed Jun 28 19:39:45 2017 +0530 Committer: sathwik <[email protected]> Committed: Wed Jun 28 19:39:45 2017 +0530 ---------------------------------------------------------------------- Rakefile | 2 +- .../DynPartner/DynPartnerMain.bpel | 138 ++++++++++++++ .../DynPartner/DynPartnerResponder.bpel | 88 +++++++++ distro/src/examples-server/DynPartner/Main.wsdl | 80 ++++++++ .../examples-server/DynPartner/Responder.wsdl | 112 +++++++++++ .../src/examples-server/DynPartner/deploy.xml | 40 ++++ .../examples-server/DynPartner/testRequest.soap | 26 +++ .../HelloWorld2/HelloWorld2.bpel | 68 +++++++ .../HelloWorld2/HelloWorld2.wsdl | 68 +++++++ .../src/examples-server/HelloWorld2/deploy.xml | 30 +++ .../HelloWorld2/testRequest.soap | 28 +++ .../src/examples-server/MagicSession/Main.bpel | 107 +++++++++++ .../src/examples-server/MagicSession/Main.wsdl | 190 +++++++++++++++++++ .../examples-server/MagicSession/Responder.bpel | 88 +++++++++ .../src/examples-server/MagicSession/deploy.xml | 44 +++++ .../MagicSession/testRequest.soap | 26 +++ distro/src/examples-server/readme.txt | 59 ++++++ 17 files changed, 1193 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/Rakefile ---------------------------------------------------------------------- diff --git a/Rakefile b/Rakefile index c998312..ba3227c 100644 --- a/Rakefile +++ b/Rakefile @@ -826,7 +826,7 @@ define "apache-ode" do define "distro" do parent.distro(self, "-war") { |zip| zip.include project("ode:axis2-war").package(:war), :as=>"ode.war" } parent.distro(self, "-jbi") { |zip| zip.include project("ode:jbi").package(:zip) } - + parent.distro(self, "-server") { |zip| zip.include project("ode:tomee-server").package(:zip) } # Preparing third party licenses build do http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/DynPartnerMain.bpel ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/DynPartnerMain.bpel b/distro/src/examples-server/DynPartner/DynPartnerMain.bpel new file mode 100644 index 0000000..379ef2f --- /dev/null +++ b/distro/src/examples-server/DynPartner/DynPartnerMain.bpel @@ -0,0 +1,138 @@ +<?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. + --> + +<process name="DynPartnerMain" + targetNamespace="http://ode/bpel/unit-test" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref" + xmlns:tns="http://ode/bpel/unit-test" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:test="http://ode/bpel/unit-test.wsdl" + xmlns:resp="http://ode/bpel/responder.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="Main.wsdl" namespace="http://ode/bpel/unit-test.wsdl" + importType="http://schemas.xmlsoap.org/wsdl/" /> + + <partnerLinks> + <partnerLink name="initiatorPartnerLink" partnerLinkType="test:InitiatorPartnerLinkType" + myRole="me"/> + <partnerLink name="responderPartnerLink" partnerLinkType="resp:ResponderPartnerLinkType" + partnerRole="responder" initializePartnerRole="yes"/> + </partnerLinks> + + <variables> + <variable name="dummy" messageType="resp:DummyMessage"/> + <variable name="dummy2" messageType="resp:Dummy2Message"/> + <variable name="partnerEndpoint" messageType="resp:EndpointMessage"/> + <variable name="partnerAck" messageType="resp:AcknowledgementMessage"/> + <variable name="result" messageType="test:ResultMessage"/> + <!-- <variable name="wsaVar" messageType="resp:WSAEndpointMessage"/> --> + </variables> + + <correlationSets> + <correlationSet name="dummyCorr" properties="test:dummyProp" /> + </correlationSets> + + <sequence> + <receive name="start" partnerLink="initiatorPartnerLink" + portType="test:DynMainPortType" operation="execute" createInstance="yes" variable="dummy"/> + + <invoke name="get-endpoint" partnerLink="responderPartnerLink" portType="resp:DynResponderPortType" + operation="getDynamicEndpoint" inputVariable="dummy" outputVariable="partnerEndpoint"> + <correlations> + <correlation set="dummyCorr" initiate="yes" pattern="request"/> + </correlations> + </invoke> + + <assign> + <copy> + <!-- Partner link assignment using the value returned by previous invoke --> + <from>$partnerEndpoint.payload</from> + <to partnerLink="responderPartnerLink"/> + </copy> + <copy> + <!-- Just needed for correlation --> + <from>$dummy.payload</from> + <to variable="dummy2" part="payload"/> + </copy> + </assign> + + <!-- Invoking the partner link service endpoint that has just been assigned --> + <invoke name="dynamic-invoke" partnerLink="responderPartnerLink" portType="resp:DynResponderPortType" + operation="acknowledge" inputVariable="dummy2" outputVariable="partnerAck"> + <correlations> + <correlation set="dummyCorr" initiate="no" pattern="request"/> + </correlations> + </invoke> + + <!-- Playing around with epr conversion (url to wsa) --> + <assign> + <copy> + <from> + <literal>http://localhost:8080/ode/processes/DynResponderService</literal> + </from> + <to partnerLink="responderPartnerLink"/> + </copy> + <copy> + <from> + <literal> + <sref:service-ref> + <soap:address location="http://localhost:8080/ode/processes/DynResponderService"/> + </sref:service-ref> + </literal> + </from> + <to partnerLink="responderPartnerLink"/> + </copy> +<!-- + <copy> + <from partnerLink="responderPartnerLink" endpointReference="partnerRole"/> + <to variable="wsaVar" part="payload"/> + </copy> + <copy> + <from variable="wsaVar" part="payload"/> + <to partnerLink="responderPartnerLink"/> + </copy> +--> + </assign> + + <!-- Invoking the partner link service endpoint that has just been explicitly assigned --> + <invoke name="dynamic-invoke" partnerLink="responderPartnerLink" portType="resp:DynResponderPortType" + operation="acknowledge" inputVariable="dummy2" outputVariable="partnerAck"> + <correlations> + <correlation set="dummyCorr" initiate="no" pattern="request"/> + </correlations> + </invoke> + + <assign> + <copy> + <from variable="partnerAck" part="payload"/> + <to variable="result" part="ack"/> + </copy> + </assign> + + <reply name="end" partnerLink="initiatorPartnerLink" + portType="test:DynMainPortType" operation="execute" variable="result"> + </reply> + + </sequence> +</process> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/DynPartnerResponder.bpel ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/DynPartnerResponder.bpel b/distro/src/examples-server/DynPartner/DynPartnerResponder.bpel new file mode 100644 index 0000000..55ef721 --- /dev/null +++ b/distro/src/examples-server/DynPartner/DynPartnerResponder.bpel @@ -0,0 +1,88 @@ +<?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. + --> + +<process name="DynPartnerResponder" + targetNamespace="http://ode/bpel/responder" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:tns="http://ode/bpel/responder" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:resp="http://ode/bpel/responder.wsdl"> + + <import location="Responder.wsdl" namespace="http://ode/bpel/responder.wsdl" + importType="http://schemas.xmlsoap.org/wsdl/" /> + + <partnerLinks> + <partnerLink name="mainPartnerLink" partnerLinkType="resp:ResponderPartnerLinkType" + myRole="responder"/> + </partnerLinks> + + <variables> + <variable name="dummy" messageType="resp:DummyMessage"/> + <variable name="dummy2" messageType="resp:Dummy2Message"/> + <variable name="myEndpoint" messageType="resp:EndpointMessage"/> + <variable name="ack" messageType="resp:AcknowledgementMessage"/> + </variables> + + <correlationSets> + <correlationSet name="dummyCorr" properties="resp:dummyProp" /> + </correlationSets> + + <sequence> + <receive name="start" partnerLink="mainPartnerLink" variable="dummy" + portType="resp:DynResponderPortType" operation="getDynamicEndpoint" createInstance="yes"> + <correlations> + <correlation set="dummyCorr" initiate="yes"/> + </correlations> + </receive> + <assign> + <copy> + <from partnerLink="mainPartnerLink" endpointReference="myRole"/> + <to>$myEndpoint.payload</to> + </copy> + </assign> + <reply name="reply-endpoint" partnerLink="mainPartnerLink" + portType="resp:DynResponderPortType" operation="getDynamicEndpoint" variable="myEndpoint"/> + + <receive name="dyn-invoke" partnerLink="mainPartnerLink" variable="dummy2" + portType="resp:DynResponderPortType" operation="acknowledge"> + <correlations> + <correlation set="dummyCorr" initiate="no"/> + </correlations> + </receive> + <assign> + <copy> + <from>'OK'</from> + <to variable="ack" part="payload"/> + </copy> + </assign> + <reply name="reply-ack" partnerLink="mainPartnerLink" + portType="resp:DynResponderPortType" operation="acknowledge" variable="ack"/> + + <receive name="dyn-invoke2" partnerLink="mainPartnerLink" variable="dummy2" + portType="resp:DynResponderPortType" operation="acknowledge"> + <correlations> + <correlation set="dummyCorr" initiate="no"/> + </correlations> + </receive> + <reply name="reply-ack" partnerLink="mainPartnerLink" + portType="resp:DynResponderPortType" operation="acknowledge" variable="ack"/> + + </sequence> +</process> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/Main.wsdl ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/Main.wsdl b/distro/src/examples-server/DynPartner/Main.wsdl new file mode 100644 index 0000000..0c433f7 --- /dev/null +++ b/distro/src/examples-server/DynPartner/Main.wsdl @@ -0,0 +1,80 @@ +<?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://ode/bpel/unit-test.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://ode/bpel/unit-test.wsdl" + xmlns:resp="http://ode/bpel/responder.wsdl" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" + xmlns:prop="http://docs.oasis-open.org/wsbpel/2.0/varprop"> + + <import namespace="http://ode/bpel/responder.wsdl" location="Responder.wsdl"/> + + <wsdl:types> + <xsd:schema targetNamespace="http://ode/bpel/unit-test.wsdl"> + <xsd:element name="result" type="xsd:string"/> + </xsd:schema> + </wsdl:types> + + <wsdl:message name="ResultMessage"> + <wsdl:part name="ack" element="tns:result"/> + </wsdl:message> + + <wsdl:portType name="DynMainPortType"> + <wsdl:operation name="execute"> + <wsdl:input message="resp:DummyMessage" name="dummy"/> + <wsdl:output message="tns:ResultMessage" name="result"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="DynMainBinding" type="tns:DynMainPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="execute"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="DynMainService"> + <wsdl:port name="DynMainPort" binding="tns:DynMainBinding"> + <soap:address location="http://localhost:8080/ode/processes/DynMainService"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="InitiatorPartnerLinkType"> + <plnk:role name="me" portType="tns:DynMainPortType"/> + </plnk:partnerLinkType> + + <prop:property name="dummyProp" type="xsd:string"/> + <prop:propertyAlias propertyName="tns:dummyProp" messageType="resp:DummyMessage" + part="payload"/> + <prop:propertyAlias propertyName="tns:dummyProp" messageType="resp:Dummy2Message" + part="payload"/> + +</wsdl:definitions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/Responder.wsdl ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/Responder.wsdl b/distro/src/examples-server/DynPartner/Responder.wsdl new file mode 100644 index 0000000..eb8db90 --- /dev/null +++ b/distro/src/examples-server/DynPartner/Responder.wsdl @@ -0,0 +1,112 @@ +<?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://ode/bpel/responder.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://ode/bpel/responder.wsdl" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsa="http://www.w3.org/2005/08/addressing" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" + xmlns:prop="http://docs.oasis-open.org/wsbpel/2.0/varprop"> + + <wsdl:types> + <xsd:schema targetNamespace="http://ode/bpel/responder.wsdl"> + <xsd:element name="dummy" type="xsd:string"/> + <xsd:element name="dummy2" type="xsd:string"/> + <xsd:element name="acknowledgement" type="xsd:string"/> + <xsd:element name="url" type="xsd:string"/> + </xsd:schema> + </wsdl:types> + + <wsdl:message name="DummyMessage"> + <wsdl:part name="payload" element="tns:dummy"/> + </wsdl:message> + + <wsdl:message name="Dummy2Message"> + <wsdl:part name="payload" element="tns:dummy2"/> + </wsdl:message> + + <wsdl:message name="EndpointMessage"> + <wsdl:part name="payload" element="tns:url"/> + </wsdl:message> + +<!-- + <wsdl:message name="WSAEndpointMessage"> + <wsdl:part name="payload" element="wsa:EndpointReference"/> + </wsdl:message> +--> + + <wsdl:message name="AcknowledgementMessage"> + <wsdl:part name="payload" element="tns:acknowledgement"/> + </wsdl:message> + + <wsdl:portType name="DynResponderPortType"> + <wsdl:operation name="getDynamicEndpoint"> + <wsdl:input message="tns:DummyMessage" name="dummy"/> + <wsdl:output message="tns:EndpointMessage" name="endpoint"/> + </wsdl:operation> + <wsdl:operation name="acknowledge"> + <wsdl:input message="tns:Dummy2Message" name="dummy2"/> + <wsdl:output message="tns:AcknowledgementMessage" name="ack"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="DynResponderBinding" type="tns:DynResponderPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="getDynamicEndpoint"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/responder.wsdl" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://ode/bpel/responder.wsdl" use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="acknowledge"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/responder.wsdl" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://ode/bpel/responder.wsdl" use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="DynResponderService"> + <wsdl:port name="DynResponderPort" binding="tns:DynResponderBinding"> + <soap:address location="http://localhost:8080/ode/processes/DynResponderService"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="ResponderPartnerLinkType"> + <plnk:role name="responder" portType="tns:DynResponderPortType"/> + </plnk:partnerLinkType> + + <prop:property name="dummyProp" type="xsd:string"/> + <prop:propertyAlias propertyName="tns:dummyProp" messageType="tns:DummyMessage" + part="payload"/> + <prop:propertyAlias propertyName="tns:dummyProp" messageType="tns:Dummy2Message" + part="payload"/> + +</wsdl:definitions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/deploy.xml ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/deploy.xml b/distro/src/examples-server/DynPartner/deploy.xml new file mode 100644 index 0000000..981f9cd --- /dev/null +++ b/distro/src/examples-server/DynPartner/deploy.xml @@ -0,0 +1,40 @@ +<!-- + ~ 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. + --> +<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" + xmlns:main="http://ode/bpel/unit-test" + xmlns:mws="http://ode/bpel/unit-test.wsdl" + xmlns:resp="http://ode/bpel/responder" + xmlns:rws="http://ode/bpel/responder.wsdl"> + + <process name="main:DynPartnerMain"> + <provide partnerLink="initiatorPartnerLink"> + <service name="mws:DynMainService" port="DynMainPort"/> + </provide> + <invoke partnerLink="responderPartnerLink"> + <service name="rws:DynResponderService" port="DynResponderPort"/> + </invoke> + </process> + <process name="resp:DynPartnerResponder"> + <in-memory>true</in-memory> + <type>resp:DynPartnerResponder</type> + <provide partnerLink="mainPartnerLink"> + <service name="rws:DynResponderService" port="DynResponderPort"/> + </provide> + </process> +</deploy> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/DynPartner/testRequest.soap ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/DynPartner/testRequest.soap b/distro/src/examples-server/DynPartner/testRequest.soap new file mode 100644 index 0000000..b899f7a --- /dev/null +++ b/distro/src/examples-server/DynPartner/testRequest.soap @@ -0,0 +1,26 @@ +<?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. + --> + +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <!-- test soap message --> + <SOAP-ENV:Body> + <ns2:dummy xmlns:ns2="http://ode/bpel/responder.wsdl">fire!</ns2:dummy> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/HelloWorld2/HelloWorld2.bpel ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/HelloWorld2/HelloWorld2.bpel b/distro/src/examples-server/HelloWorld2/HelloWorld2.bpel new file mode 100644 index 0000000..f924624 --- /dev/null +++ b/distro/src/examples-server/HelloWorld2/HelloWorld2.bpel @@ -0,0 +1,68 @@ +<!-- + ~ 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="HelloWorld2" + targetNamespace="http://ode/bpel/unit-test" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:tns="http://ode/bpel/unit-test" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:test="http://ode/bpel/unit-test.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="HelloWorld2.wsdl" + namespace="http://ode/bpel/unit-test.wsdl" + importType="http://schemas.xmlsoap.org/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 variable="myVar" part="TestPart"/> + <to variable="tmpVar"/> + </copy> + <copy> + <from>concat($tmpVar,' World')</from> + <to variable="myVar" part="TestPart"/> + </copy> + </assign> + <reply name="end" + partnerLink="helloPartnerLink" + portType="test:HelloPortType" + operation="hello" + variable="myVar"/> + </sequence> +</process> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/HelloWorld2/HelloWorld2.wsdl ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/HelloWorld2/HelloWorld2.wsdl b/distro/src/examples-server/HelloWorld2/HelloWorld2.wsdl new file mode 100644 index 0000000..3ab0020 --- /dev/null +++ b/distro/src/examples-server/HelloWorld2/HelloWorld2.wsdl @@ -0,0 +1,68 @@ +<?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://ode/bpel/unit-test.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://ode/bpel/unit-test.wsdl" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"> + + <wsdl:message name="HelloMessage"> + <wsdl:part name="TestPart" type="xsd:string"/> + </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"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="hello"> + <soap:operation soapAction="" style="rpc"/> + <wsdl:input> + <soap:body + namespace="http://ode/bpel/unit-test.wsdl" + use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body + namespace="http://ode/bpel/unit-test.wsdl" + use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="HelloService"> + <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding"> + <soap:address location="http://localhost:8080/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> + http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/HelloWorld2/deploy.xml ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/HelloWorld2/deploy.xml b/distro/src/examples-server/HelloWorld2/deploy.xml new file mode 100644 index 0000000..8a2ad14 --- /dev/null +++ b/distro/src/examples-server/HelloWorld2/deploy.xml @@ -0,0 +1,30 @@ +<!-- + ~ 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. + --> +<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" + xmlns:pns="http://ode/bpel/unit-test" + xmlns:wns="http://ode/bpel/unit-test.wsdl"> + + + <process name="pns:HelloWorld2"> + <active>true</active> + <provide partnerLink="helloPartnerLink"> + <service name="wns:HelloService" port="HelloPort"/> + </provide> + </process> +</deploy> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/HelloWorld2/testRequest.soap ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/HelloWorld2/testRequest.soap b/distro/src/examples-server/HelloWorld2/testRequest.soap new file mode 100644 index 0000000..6ac42a1 --- /dev/null +++ b/distro/src/examples-server/HelloWorld2/testRequest.soap @@ -0,0 +1,28 @@ +<?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. + --> + +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <!-- test soap message --> + <SOAP-ENV:Body> + <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl"> + <TestPart xmlns="">Hello</TestPart> + </ns1:hello> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/MagicSession/Main.bpel ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/MagicSession/Main.bpel b/distro/src/examples-server/MagicSession/Main.bpel new file mode 100644 index 0000000..f227ed9 --- /dev/null +++ b/distro/src/examples-server/MagicSession/Main.bpel @@ -0,0 +1,107 @@ +<?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. + --> + +<process name="MagicSessionMain" + targetNamespace="http://ode/bpel/unit-test" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:tns="http://ode/bpel/unit-test" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:test="http://ode/bpel/unit-test.wsdl"> + + <import location="Main.wsdl" namespace="http://ode/bpel/unit-test.wsdl" + importType="http://schemas.xmlsoap.org/wsdl/" /> + + <partnerLinks> + <partnerLink name="responderPartnerLink" partnerLinkType="test:ResponderPartnerLinkType" + myRole="main" partnerRole="responder" initializePartnerRole="yes"/> + <partnerLink name="executePartnerLink" partnerLinkType="test:ExecutePartnerLinkType" + myRole="executor"/> + </partnerLinks> + + <variables> + <variable name="dummy" messageType="test:ExecuteMessage"/> + <variable name="dummy2" messageType="test:InitiateMessage"/> + <variable name="dummy3" messageType="test:CallbackMessage"/> + <variable name="dummy4" messageType="test:DoubleCallMessage"/> + <variable name="dummy5" messageType="test:DoubleCallbackMessage"/> + <variable name="eprmessage" messageType="test:TripleCallMessage"/> + <variable name="myepr" messageType="test:TripleCallbackMessage"/> + <variable name="result" messageType="test:ResultMessage"/> + </variables> + + <sequence> + <!-- Start message --> + <receive name="start" partnerLink="executePartnerLink" + portType="test:MSExecutePortType" operation="execute" createInstance="yes" variable="dummy"/> + + <!-- Initializing message, starting the responder process with the magic session + and expecting a callback --> + <assign> + <copy> + <from>123</from> + <to variable="dummy2" part="payload"/> + </copy> + </assign> + <invoke name="initiate" partnerLink="responderPartnerLink" portType="test:MSResponderPortType" + operation="initiate" inputVariable="dummy2"/> + + <receive name="callback" partnerLink="responderPartnerLink" + portType="test:MSMainPortType" operation="callback" variable="dummy3"/> + + <!-- Initializing message, calling our partner again with magic session (double invocation) --> + <assign> + <copy> + <from>123</from> + <to variable="dummy4" part="payload"/> + </copy> + </assign> + <invoke name="get-endpoint" partnerLink="responderPartnerLink" portType="test:MSResponderPortType" + operation="doubleCall" inputVariable="dummy4"/> + + <receive name="doubleCallback" partnerLink="responderPartnerLink" + portType="test:MSMainPortType" operation="doubleCallback" variable="dummy5"/> + + <!-- Sending our endpoint explicitly to have our partner calling us back using it + (demonstrating assignment) --> + <assign> + <copy> + <from partnerLink="responderPartnerLink" endpointReference="myRole"/> + <to variable="eprmessage" part="payload"/> + </copy> + </assign> + <invoke name="eprPassing" partnerLink="responderPartnerLink" portType="test:MSResponderPortType" + operation="EndpointReference" inputVariable="eprmessage"/> + + <receive name="tripleCallback" partnerLink="responderPartnerLink" + portType="test:MSMainPortType" operation="tripleCallback" variable="myepr"/> + + <!-- Done. --> + <assign> + <copy> + <from>'OK'</from> + <to variable="result" part="ack"/> + </copy> + </assign> + <reply name="end" partnerLink="executePartnerLink" + portType="test:MSExecutePortType" operation="execute" variable="result"/> + + </sequence> +</process> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/MagicSession/Main.wsdl ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/MagicSession/Main.wsdl b/distro/src/examples-server/MagicSession/Main.wsdl new file mode 100644 index 0000000..b061080 --- /dev/null +++ b/distro/src/examples-server/MagicSession/Main.wsdl @@ -0,0 +1,190 @@ +<?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://ode/bpel/unit-test.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://ode/bpel/unit-test.wsdl" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsa="http://www.w3.org/2005/08/addressing" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"> + + <types> + <xsd:element name="result" type="xsd:string"/> + <xsd:element name="execute" type="xsd:string"/> + <xsd:element name="callback" type="xsd:string"/> + <xsd:element name="doubleCallback" type="xsd:string"/> + <xsd:element name="tripleCallback" type="xsd:string"/> + <xsd:element name="initiate" type="xsd:string"/> + <xsd:element name="doubleCall" type="xsd:string"/> + <xsd:element name="tripleCall" type="wsa:EndpointReference"/> + </types> + + <wsdl:message name="ExecuteMessage"> + <wsdl:part name="payload" element="tns:execute"/> + </wsdl:message> + + <wsdl:message name="CallbackMessage"> + <wsdl:part name="payload" element="tns:callback"/> + </wsdl:message> + + <wsdl:message name="DoubleCallbackMessage"> + <wsdl:part name="payload" element="tns:doubleCallback"/> + </wsdl:message> + + <wsdl:message name="TripleCallbackMessage"> + <wsdl:part name="payload" element="tns:tripleCallback"/> + </wsdl:message> + + <wsdl:message name="ResultMessage"> + <wsdl:part name="ack" element="tns:result"/> + </wsdl:message> + + <wsdl:message name="InitiateMessage"> + <wsdl:part name="payload" element="tns:initiate"/> + </wsdl:message> + + <wsdl:message name="DoubleCallMessage"> + <wsdl:part name="payload" element="tns:doubleCall"/> + </wsdl:message> + + <wsdl:message name="TripleCallMessage"> + <wsdl:part name="payload" element="wsa:EndpointReference"/> + </wsdl:message> + + <wsdl:portType name="MSExecutePortType"> + <wsdl:operation name="execute"> + <wsdl:input message="tns:ExecuteMessage" name="Execute"/> + <wsdl:output message="tns:ResultMessage" name="Result"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:portType name="MSMainPortType"> + <wsdl:operation name="callback"> + <wsdl:input message="tns:CallbackMessage" name="Callback"/> + </wsdl:operation> + <wsdl:operation name="doubleCallback"> + <wsdl:input message="tns:DoubleCallbackMessage" name="DoubleCallback"/> + </wsdl:operation> + <wsdl:operation name="tripleCallback"> + <wsdl:input message="tns:TripleCallbackMessage" name="TripleCallback"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:portType name="MSResponderPortType"> + <wsdl:operation name="initiate"> + <wsdl:input message="tns:InitiateMessage" name="Callback"/> + </wsdl:operation> + <wsdl:operation name="doubleCall"> + <wsdl:input message="tns:DoubleCallMessage" name="DoubleCallback"/> + </wsdl:operation> + <wsdl:operation name="EndpointReference"> + <wsdl:input message="tns:TripleCallMessage" name="EndpointReference"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="MSExecuteBinding" type="tns:MSExecutePortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="execute"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="MSMainBinding" type="tns:MSMainPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="callback"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="doubleCallback"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="tripleCallback"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + + <wsdl:binding name="MSResponderBinding" type="tns:MSResponderPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="initiate"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="doubleCall"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + <wsdl:operation name="EndpointReference"> + <soap:operation soapAction="" style="document"/> + <wsdl:input> + <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + + <!-- This service should be used to start the example. --> + <wsdl:service name="MSMainExecuteService"> + <wsdl:port name="MSExecutePort" binding="tns:MSExecuteBinding"> + <soap:address location="http://localhost:8080/ode/processes/MSMainExecuteService"/> + </wsdl:port> + </wsdl:service> + + <!-- This service is internal, only used by the responder. --> + <wsdl:service name="MSMainService"> + <wsdl:port name="MSMainPort" binding="tns:MSMainBinding"> + <soap:address location="http://localhost:8080/ode/processes/MSMainService"/> + </wsdl:port> + </wsdl:service> + + <!-- Service responding to the main service requests. --> + <wsdl:service name="MSResponderService"> + <wsdl:port name="MSResponderPort" binding="tns:MSResponderBinding"> + <soap:address location="http://localhost:8080/ode/processes/MSResponderService"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="ResponderPartnerLinkType"> + <plnk:role name="responder" portType="tns:MSResponderPortType"/> + <plnk:role name="main" portType="tns:MSMainPortType"/> + </plnk:partnerLinkType> + + <plnk:partnerLinkType name="ExecutePartnerLinkType"> + <plnk:role name="executor" portType="tns:MSExecutePortType"/> + </plnk:partnerLinkType> + +</wsdl:definitions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/MagicSession/Responder.bpel ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/MagicSession/Responder.bpel b/distro/src/examples-server/MagicSession/Responder.bpel new file mode 100644 index 0000000..26230c9 --- /dev/null +++ b/distro/src/examples-server/MagicSession/Responder.bpel @@ -0,0 +1,88 @@ +<?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. + --> + +<process name="MagicSessionResponder" + targetNamespace="http://ode/bpel/responder" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:tns="http://ode/bpel/responder" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:resp="http://ode/bpel/unit-test.wsdl"> + + <import location="Main.wsdl" namespace="http://ode/bpel/unit-test.wsdl" + importType="http://schemas.xmlsoap.org/wsdl/" /> + + <partnerLinks> + <partnerLink name="mainPartnerLink" partnerLinkType="resp:ResponderPartnerLinkType" + myRole="responder" partnerRole="main" initializePartnerRole="yes"/> + </partnerLinks> + + <variables> + <variable name="dummy2" messageType="resp:InitiateMessage"/> + <variable name="dummy3" messageType="resp:CallbackMessage"/> + <variable name="dummy4" messageType="resp:DoubleCallMessage"/> + <variable name="dummy5" messageType="resp:DoubleCallbackMessage"/> + <variable name="eprmessage" messageType="resp:TripleCallMessage"/> + <variable name="dummy6" messageType="resp:TripleCallbackMessage"/> + </variables> + + <sequence> + <!-- Starting process and first callback --> + <receive name="start" partnerLink="mainPartnerLink" variable="dummy2" + portType="resp:MSResponderPortType" operation="initiate" createInstance="yes"/> + <assign> + <copy> + <from>123</from> + <to variable="dummy3" part="payload"/> + </copy> + </assign> + <invoke name="callback" partnerLink="mainPartnerLink" + portType="resp:MSMainPortType" operation="callback" inputVariable="dummy3"/> + + <!-- Second callback --> + <receive name="doubleCall" partnerLink="mainPartnerLink" variable="dummy4" + portType="resp:MSResponderPortType" operation="doubleCall"/> + <assign> + <copy> + <from>123</from> + <to variable="dummy5" part="payload"/> + </copy> + </assign> + <invoke name="doubleCallback" partnerLink="mainPartnerLink" + portType="resp:MSMainPortType" operation="doubleCallback" inputVariable="dummy5"/> + + <!-- Callback on the epr explicitly provided by partner in the message + (demonstrating assignment) --> + <receive name="eprPassing" partnerLink="mainPartnerLink" variable="eprmessage" + portType="resp:MSResponderPortType" operation="EndpointReference"/> + <assign> + <copy> + <from variable="eprmessage" part="payload"/> + <to partnerLink="mainPartnerLink"/> + </copy> + <copy> + <from>123</from> + <to variable="dummy6" part="payload"/> + </copy> + </assign> + <invoke name="tripleCallback" partnerLink="mainPartnerLink" + portType="resp:MSMainPortType" operation="tripleCallback" inputVariable="dummy6"/> + + </sequence> +</process> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/MagicSession/deploy.xml ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/MagicSession/deploy.xml b/distro/src/examples-server/MagicSession/deploy.xml new file mode 100644 index 0000000..0c13a13 --- /dev/null +++ b/distro/src/examples-server/MagicSession/deploy.xml @@ -0,0 +1,44 @@ +<!-- + ~ 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. + --> +<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" + xmlns:main="http://ode/bpel/unit-test" + xmlns:mws="http://ode/bpel/unit-test.wsdl" + xmlns:resp="http://ode/bpel/responder"> + + <process name="main:MagicSessionMain"> + <provide partnerLink="executePartnerLink"> + <service name="mws:MSMainExecuteService" port="MSExecutePort"/> + </provide> + <provide partnerLink="responderPartnerLink"> + <service name="mws:MSMainService" port="MSMainPort"/> + </provide> + <invoke partnerLink="responderPartnerLink"> + <service name="mws:MSResponderService" port="MSResponderPort"/> + </invoke> + </process> + <process name="resp:MagicSessionResponder"> + <type>resp:MagicSessionResponder</type> + <provide partnerLink="mainPartnerLink"> + <service name="mws:MSResponderService" port="MSResponderPort"/> + </provide> + <invoke partnerLink="mainPartnerLink"> + <service name="mws:MSMainService" port="MSMainPort"/> + </invoke> + </process> +</deploy> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/MagicSession/testRequest.soap ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/MagicSession/testRequest.soap b/distro/src/examples-server/MagicSession/testRequest.soap new file mode 100644 index 0000000..de642f1 --- /dev/null +++ b/distro/src/examples-server/MagicSession/testRequest.soap @@ -0,0 +1,26 @@ +<?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. + --> + +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <!-- test soap message --> + <SOAP-ENV:Body> + <ns1:execute xmlns:ns1="http://ode/bpel/unit-test.wsdl">fire!</ns1:execute> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> http://git-wip-us.apache.org/repos/asf/ode/blob/7750a155/distro/src/examples-server/readme.txt ---------------------------------------------------------------------- diff --git a/distro/src/examples-server/readme.txt b/distro/src/examples-server/readme.txt new file mode 100644 index 0000000..09ebd24 --- /dev/null +++ b/distro/src/examples-server/readme.txt @@ -0,0 +1,59 @@ +To deploy any example in Ode just copy its whole directory to the +WEB-INF/processes directory of your deployed exploded webapp. To +be able to easily send messages put the bin directory or Ode's +distribution in your path: + +Windows +set PATH=%PATH%;PATH_TO_ODE\bin + +Linux +export PATH=$PATH:PATH_TO_ODE/bin + +The sendsoap command can either be executed using sendsoap.bat under +Windows or sendsoap with Linux (replace accordingly in the +following command line examples). + +Hello World 2 +============= +Demonstrates a simple service invocation that synchronously replies to +a message. Built using WS-BPEL 2.0 syntax. After deployment, start a +process with the command: + +sendsoap http://localhost:8080/ode/processes/helloWorld testRequest.soap + +Please make sure that you execute the command from the example +directory. The response should be a SOAP message containing the +'hello world' string. + +Dynamic Partner +=============== +Demonstrates dynamic partner assignment. The main process asks for the +responder process endpoint. The responder process gives its endpoint by +assigning it to a message (assign my role) and replying this message to +the main process. The main process invokes again the responder process +but this time using the endpoint it just receives instead of the +default one. + +After deployment, start a process with the command: + +sendsoap http://localhost:8080/ode/processes/DynMainService testRequest.soap + +Please make sure that you execute the command from the example +directory. The response should be an 'OK' SOAP message, showing +that all invocations have been successful. + +Magic Session +============= +Demonstrates the usage of "magic sessions" or implicit correlation. Ode +supports implicit correlation between two processes or with other +services using a session-based protocol. So you don't need to provide +any correlation mechanism to establish a stateful interaction (see Ode's +website for more information). + +After deployment, start a process with the command: + +sendsoap http://localhost:8080/ode/processes/MSMainExecuteService testRequest.soap + +Please make sure that you execute the command from the example +directory. The response should be an 'OK' SOAP message, showing +that all invocations have been successful.
