Author: jeff.yuchang
Date: 2010-02-26 06:00:48 -0500 (Fri, 26 Feb 2010)
New Revision: 515
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/Component-SMSCTBC-1.0.0.war
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.wsdl
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml
Modified:
trunk/integration-tests/build.xml
Log:
* Add test case for RiftSaw-163, not fully working yet.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-02-25 16:31:53 UTC (rev 514)
+++ trunk/integration-tests/build.xml 2010-02-26 11:00:48 UTC (rev 515)
@@ -86,7 +86,7 @@
<echo>JNP port detected, just waiting for 1 min 30 secs to ensure server
started</echo>
- <sleep minutes="1" seconds="30" />
+ <sleep minutes="2" seconds="30" />
<echo>Server has started</echo>
@@ -143,6 +143,7 @@
<ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_144/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_154/build.xml" />
+ <ant antfile="src/test/resources/testcases/RiftSaw_163/build.xml" />
</target>
</project>
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.testcases;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the RiftSaw163 (header) testcase.
+ */
+public class RiftSaw163TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_163";
+
+ public RiftSaw163TestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(RiftSaw163TestCase.class,
+ TEST_NAME, "RiftSaw_163-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendSOAPMessage("hello_request1.xml",
+ "http://localhost:8080/RiftSaw_163WS");
+
+ System.out.println(result);
+ //TODO: Add method for verification.
+ //assertMessageFromFile(result, "hello_response1.xml");
+ }
+}
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/Component-SMSCTBC-1.0.0.war
===================================================================
(Binary files differ)
Property changes on:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/Component-SMSCTBC-1.0.0.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<definitions name="ComponentSMSCTBCService"
+ targetNamespace="http://cocreation.com.br/componentsmsctbc"
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://cocreation.com.br/componentsmsctbc"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+
xmlns:types="http://www.jboss.org/cid">
+
+ <types>
+ <xsd:schema
targetNamespace="http://www.jboss.org/cid">
+ <xsd:element name="userName" type="xsd:string" />
+ </xsd:schema>
+ </types>
+
+ <message name="ComponentSMSCTBC_sendSMSResponse">
+ <part name="return" type="xsd:string" />
+ </message>
+
+ <message name="ComponentSMSCTBC_sendSMS">
+ <part name="from" type="xsd:string" />
+ <part name="to" type="xsd:string" />
+ <part name="message" type="xsd:string" />
+ <part name="userName" element="types:userName" />
+ </message>
+
+ <portType name="ComponentSMSCTBC">
+ <operation name="sendSMS" parameterOrder="from to message">
+ <input message="tns:ComponentSMSCTBC_sendSMS" />
+ <output message="tns:ComponentSMSCTBC_sendSMSResponse" />
+ </operation>
+ </portType>
+
+ <binding name="ComponentSMSCTBCBinding"
type="tns:ComponentSMSCTBC">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="sendSMS">
+ <soap:operation soapAction="" style="rpc"/>
+ <input>
+ <soap:body namespace="http://cocreation.com.br/componentsmsctbc"
+ use="literal" parts="from to message"/>
+ <soap:header message="tns:ComponentSMSCTBC_sendSMS"
+ part="userName" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://cocreation.com.br/componentsmsctbc"
+ use="literal" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="ComponentSMSCTBCService">
+ <port binding="tns:ComponentSMSCTBCBinding"
name="ComponentSMSCTBCPort">
+ <soap:address
+ location="http://localhost:8080/Component-SMSCTBC-1.0.0/ComponentSMSCTBC"
/>
+ </port>
+ </service>
+
+ <plnk:partnerLinkType name="ComponentSMSPartnerLinkType">
+ <plnk:role name="componentsms" portType="tns:ComponentSMSCTBC"
/>
+ </plnk:partnerLinkType>
+</definitions>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,104 @@
+<process name="HelloWorld"
+
targetNamespace="http://www.jboss.org/bpel/examples"
+
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+
xmlns:tns="http://www.jboss.org/bpel/examples"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:intf2="http://cocreation.com.br/componentsmsctbc"
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
+ 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"
+
namespace="http://www.jboss.org/bpel/examples/wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+ <import location="ComponentSMSCTBC.wsdl"
+ namespace="http://cocreation.com.br/componentsmsctbc"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="intf:HelloPartnerLinkType"
+ myRole="me" />
+ <partnerLink name="componentSMSPartnerLink"
+ partnerLinkType="intf2:ComponentSMSPartnerLinkType"
+ partnerRole="componentsms"
+ initializePartnerRole="yes"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="intf:HelloMessage"/>
+ <variable name="mesgVar" type="xsd:string"/>
+ <variable name="userName" type="xsd:string"/>
+ <variable name="password" type="xsd:string"/>
+ <variable name="inVar"
messageType="intf2:ComponentSMSCTBC_sendSMS"/>
+ <variable name="outVar"
messageType="intf2:ComponentSMSCTBC_sendSMSResponse"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="intf:HelloPortType"
+ operation="hello"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <assign validate="no" name="assignHelloMesg">
+ <copy>
+ <from variable="myVar" header="userName"/>
+ <to variable="userName"/>
+ </copy>
+ <copy>
+ <from variable="myVar" header="password"/>
+ <to variable="password"/>
+ </copy>
+ <copy>
+ <from variable="myVar" part="TestPart"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($userName, $password)</from>
+ <to variable="myVar" part="TestPart"/>
+ </copy>
+ </assign>
+
+ <bpel:assign validate="no" name="assignInvoke">
+ <copy>
+ <from>
+ <literal>9999999</literal>
+ </from>
+ <to part="from" variable="inVar"/>
+ </copy>
+ <copy>
+ <from>
+ <literal>11111</literal>
+ </from>
+ <to part="to" variable="inVar"/>
+ </copy>
+ <copy>
+ <from>
+ <literal>mmemem</literal>
+ </from>
+ <to part="message" variable="inVar"/>
+ </copy>
+ <copy>
+ <from><literal>user</literal></from>
+ <to part="userName" variable="inVar"/>
+ </copy>
+ </bpel:assign>
+
+ <invoke name="InvokeComponentSMS"
+ partnerLink="componentSMSPartnerLink"
+ portType="intf2:ComponentSMSCTBC"
+ operation="sendSMS"
+ inputVariable="inVar"
+ outputVariable="outVar"/>
+
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="intf:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+</process>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.wsdl 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<wsdl:definitions
+
targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:tns="http://www.jboss.org/bpel/examples/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://www.jboss.org/bpel/examples/wsdl"
use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
namespace="http://www.jboss.org/bpel/examples/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/RiftSaw_163WS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,15 @@
+<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+
xmlns:bpl="http://www.jboss.org/bpel/examples"
+
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:intf2="http://cocreation.com.br/componentsmsctbc">
+
+ <process name="bpl:HelloWorld">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="intf:HelloService" port="HelloPort"/>
+ </provide>
+ <invoke partnerLink="componentSMSPartnerLink">
+ <service name="intf2:ComponentSMSCTBCService"
port="ComponentSMSCTBCPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml
(rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,35 @@
+<project name="RiftSaw_163" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="version" value="1" />
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/testcases/${ant.project.name}" />
+
+ <property name="jar.name"
value="${ant.project.name}-${version}.jar" />
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <jar basedir="${test.dir}/bpel"
destfile="${deploy.dir}/${ant.project.name}/${jar.name}" />
+
+ <copy todir="${deploy.dir}/${ant.project.name}">
+ <fileset dir="${test.dir}/messages"/>
+ </copy>
+
+ <echo message="${test.dir}/Component-SMSCTBC-1.0.0.war" />
+ <copy file="${test.dir}/Component-SMSCTBC-1.0.0.war"
todir="${deploy.dir}/${ant.project.name}" />
+
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${jar.name}" />
+ <delete file="${deploy.dir}/Component-SMSCTBC-1.0.0.war" />
+ </target>
+
+</project>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml 2010-02-26
11:00:48 UTC (rev 515)
@@ -0,0 +1,8 @@
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <TestPart>Hello</TestPart>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file