Author: objectiser
Date: 2011-02-23 06:30:49 -0500 (Wed, 23 Feb 2011)
New Revision: 1311
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw345TestCase.java
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.bpel
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.wsdl
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/deploy.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/build.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_request1.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_response1.xml
Removed:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/purchase/
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/travel/
trunk/samples/tutorial/atm/
trunk/samples/tutorial/purchase/
trunk/samples/tutorial/travel_agency/
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/pom.xml
Log:
Removed jBPM3 BPEL examples, as never fully working, and added testcase for RIFTSAW-345
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2011-02-22 14:46:49 UTC (rev 1310)
+++ trunk/integration-tests/build.xml 2011-02-23 11:30:49 UTC (rev 1311)
@@ -196,12 +196,6 @@
<ant
antfile="src/test/resources/samples/Quickstart_bpel_simple_pick/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml"
/>
- <ant antfile="src/test/resources/samples/Tutorial_bpel_atm/build.xml"
/>
- <!--
- <ant antfile="src/test/resources/samples/Tutorial_bpel_purchase/build.xml"
/>
- -->
- <ant
antfile="src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml"
/>
-
<ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_154/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_163/build.xml" />
@@ -215,6 +209,7 @@
<ant antfile="src/test/resources/testcases/RiftSaw_299_ws/build.xml"
/>
<ant antfile="src/test/resources/testcases/RiftSaw_312/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_326/build.xml" />
+ <ant antfile="src/test/resources/testcases/RiftSaw_345/build.xml" />
<ant antfile="src/test/resources/management/RiftSaw_238/build.xml" />
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2011-02-22 14:46:49 UTC (rev 1310)
+++ trunk/integration-tests/pom.xml 2011-02-23 11:30:49 UTC (rev 1311)
@@ -592,12 +592,6 @@
<include>**/*TestCase.java</include>
<include>**/*Test.java</include>
</includes>
- <!--
https://jira.jboss.org/jira/browse/RIFTSAW-34 -->
- <excludes>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java</exclude>
- </excludes>
</configuration>
<executions>
<execution>
@@ -665,11 +659,7 @@
<include>**/*TestCase.java</include>
<include>**/*Test.java</include>
</includes>
- <!--
https://jira.jboss.org/jira/browse/RIFTSAW-34 -->
<excludes>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java</exclude>
<exclude>org/jboss/soa/bpel/tests/esb/**/*TestCase.java</exclude>
<exclude>org/jboss/soa/bpel/tests/esb/**/*Test.java</exclude>
</excludes>
Deleted:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java 2011-02-22
14:46:49 UTC (rev 1310)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java 2011-02-23
11:30:49 UTC (rev 1311)
@@ -1,193 +0,0 @@
-/*
- * 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.samples;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.atm.AtmService;
-import org.jboss.soa.bpel.tests.samples.atm.FrontEnd;
-import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds;
-import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds_Exception;
-import org.jboss.soa.bpel.tests.samples.atm.UnauthorizedAccess_Exception;
-
-/**
- * Test for common ATM usage scenarios.
- *
- * @author Juan Cantu
- * @author Alejandro Guizar
- */
-public class TutorialBPELAtmTestCase extends RiftSawTest {
-
- private FrontEnd frontEnd;
-
- private static final String TEST_NAME = "Tutorial_bpel_atm";
-
- public TutorialBPELAtmTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(TutorialBPELAtmTestCase.class, TEST_NAME,
- "Tutorial_bpel_atm.war,Tutorial_bpel_atm-1.jar");
- }
-
- protected void setUp() throws Exception {
- AtmService frontEndService = new AtmService();
-
- // obtain dynamic proxy for web service port
- frontEnd = frontEndService.getFrontEndPort();
- }
-
- public void testConnect() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
- assertTrue(ticketNumber > 0);
-
- // check atm is connected
- String status = frontEnd.status(ticketNumber);
- assertEquals("connected", status);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testLogOnAuthorized() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "koen";
- try {
- frontEnd.logOn(ticketNumber, customerName);
- }
- catch (UnauthorizedAccess_Exception e) {
- fail("log on of authorized customer should succeed");
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testLogOnUnauthorized() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "nobody";
- try {
- frontEnd.logOn(ticketNumber, customerName);
- fail("log on of unauthorized customer should fail");
- }
- catch (UnauthorizedAccess_Exception e) {
- assertEquals(customerName, e.getFaultInfo().getCustomerName());
- }
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testDeposit() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "tom";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // deposit some funds
- double newBalance = frontEnd.deposit(customerName, 10);
- // check the new balance is correct
- assertEquals(previousBalance + 10, newBalance, 0);
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testWithdrawUnderBalance() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "tom";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // withdraw some funds
- try {
- double newBalance = frontEnd.withdraw(customerName, 10);
- // check new balance is correct
- assertEquals(previousBalance - 10, newBalance, 0);
- }
- catch (InsufficientFunds_Exception e) {
- fail("withdraw under balance should succeed");
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testWithdrawOverBalance() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "fady";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // try to withdraw an amount greater than current balance
- try {
- frontEnd.withdraw(customerName, previousBalance + 1);
- fail("withdraw over balance should fail");
- }
- catch (InsufficientFunds_Exception e) {
- InsufficientFunds faultInfo = e.getFaultInfo();
- assertEquals(customerName, faultInfo.getCustomerName());
- // check account balance has not changed
- assertEquals(previousBalance, faultInfo.getAmount(), 0);
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-}
\ No newline at end of file
Deleted:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java 2011-02-22
14:46:49 UTC (rev 1310)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java 2011-02-23
11:30:49 UTC (rev 1311)
@@ -1,107 +0,0 @@
-/*
- * 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.samples;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.purchase.CustomerInfo;
-import org.jboss.soa.bpel.tests.samples.purchase.Invoice;
-import org.jboss.soa.bpel.tests.samples.purchase.OrderFaultType;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrder;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrderPT;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseSVC;
-
-/**
- * Test for common order purchasing scenarios.
- *
- * @author Jeff DeLong
- * @author Alejandro Guizar
- */
-public class TutorialBPELPurchaseTestCase extends RiftSawTest {
-
- private PurchaseOrderPT purchaseOrderPT;
-
- private static final String TEST_NAME = "Tutorial_bpel_purchase";
-
- public TutorialBPELPurchaseTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(
- TutorialBPELPurchaseTestCase.class,
- TEST_NAME,
- "purchase-queue-service.xml,Tutorial_bpel_purchase.war,Tutorial_bpel_purchase_ejb.jar,Tutorial_bpel_purchase-1.jar");
- }
-
- protected void setUp() throws Exception {
- PurchaseSVC service = new PurchaseSVC();
- purchaseOrderPT = service.getPurchaseOrderSP();
- }
-
- public void testSendPurchaseOrderAvailable() {
- CustomerInfo customerInfo = new CustomerInfo();
- customerInfo.setCustomerId("manager");
- customerInfo.setAddress("123 Main St");
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setOrderId(10);
- purchaseOrder.setPartNumber(23);
- purchaseOrder.setQuantity(4);
-
- try {
- Invoice invoice =
- purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
- // In our system, the part number is also the unit price!
- // The shipper charges a flat fare of $9.50
- assertEquals(purchaseOrder.getPartNumber() * purchaseOrder.getQuantity()
- + 9.50, invoice.getAmount(), 0);
- assertEquals(purchaseOrder.getOrderId(), invoice.getOrderId());
- }
- catch (OrderFaultType e) {
- fail("shipping to available address should complete");
- }
- }
-
- public void testSendPurchaseOrderNotAvailable() {
- CustomerInfo customerInfo = new CustomerInfo();
- customerInfo.setCustomerId("freddy");
- customerInfo.setAddress("666 Elm St");
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setOrderId(20);
- purchaseOrder.setPartNumber(13);
- purchaseOrder.setQuantity(7);
-
- try {
- purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
- fail("shipping to unavailable address should not complete");
- }
- catch (OrderFaultType e) {
- assertTrue(e.getFaultInfo()
- .getDetail()
- .indexOf(customerInfo.getAddress()) != -1);
- }
- }
-}
Deleted:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java 2011-02-22
14:46:49 UTC (rev 1310)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java 2011-02-23
11:30:49 UTC (rev 1311)
@@ -1,141 +0,0 @@
-/*
- * 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.samples;
-
-import java.rmi.RemoteException;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.travel.Cancelation;
-import org.jboss.soa.bpel.tests.samples.travel.Detail;
-import org.jboss.soa.bpel.tests.samples.travel.Flight;
-import org.jboss.soa.bpel.tests.samples.travel.Hotel;
-import org.jboss.soa.bpel.tests.samples.travel.Invoice;
-import org.jboss.soa.bpel.tests.samples.travel.ItemSet;
-import org.jboss.soa.bpel.tests.samples.travel.Order;
-import org.jboss.soa.bpel.tests.samples.travel.Penalty;
-import org.jboss.soa.bpel.tests.samples.travel.Query;
-import org.jboss.soa.bpel.tests.samples.travel.RentalCar;
-import org.jboss.soa.bpel.tests.samples.travel.TravelAgent;
-import org.jboss.soa.bpel.tests.samples.travel.TravelService;
-
-/**
- * @author Alejandro Guizar
- */
-public class TutorialBPELTravelAgencyTestCase extends RiftSawTest {
-
- private TravelAgent travelAgent;
-
- private Flight flight = new Flight();
- private Hotel hotel = new Hotel();
- private RentalCar car = new RentalCar();
- private XMLGregorianCalendar tripDate;
-
- private static final String TEST_NAME = "Tutorial_bpel_travel_agency";
-
- public TutorialBPELTravelAgencyTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(TutorialBPELTravelAgencyTestCase.class,
- TEST_NAME,
- "Tutorial_bpel_travel_agency.war,Tutorial_bpel_travel_agency-1.jar");
- }
-
- protected void setUp() throws Exception {
- TravelService tripService = new TravelService();
- travelAgent = tripService.getTravelAgentPort();
-
- flight.setAirline("AM");
- flight.setNumber(637);
- hotel.setName("Maria Isabel");
- car.setCompany("Alamo");
-
- GregorianCalendar now = new GregorianCalendar();
- now.add(Calendar.SECOND, 10);
- tripDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(now);
- }
-
- public void testPurchaseTrip() throws RemoteException {
- ItemSet items = new ItemSet();
- items.setFlight(flight); // cost: 300
- items.setHotel(hotel); // cost: 100
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
- assertEquals(300 + 100, invoice.getCost(), 0);
- }
-
- public void testGetTripDetails() throws RemoteException {
- ItemSet items = new ItemSet();
- items.setFlight(flight);
- items.setHotel(hotel);
- items.setRentalCar(car);
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
-
- Query query = new Query();
- query.setLocator(invoice.getLocator());
-
- Detail detail = travelAgent.getTripDetail(query);
- items = detail.getItems();
-
- assertEquals(flight.getAirline(), items.getFlight().getAirline());
- assertEquals(flight.getNumber(), items.getFlight().getNumber());
- assertEquals(hotel.getName(), items.getHotel().getName());
- assertEquals(car.getCompany(), items.getRentalCar().getCompany());
- assertEquals(invoice.getCost(), detail.getCost(), 0);
- }
-
- public void testCancelTrip() throws Exception {
- ItemSet items = new ItemSet();
- items.setFlight(flight); // fee: 100
- items.setRentalCar(car); // fee: 5
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
-
- Cancelation reference = new Cancelation();
- reference.setLocator(invoice.getLocator());
-
- Penalty penalty = travelAgent.cancelTrip(reference);
- assertEquals(100 + 5, penalty.getFee(), 0);
- }
-}
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw345TestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw345TestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw345TestCase.java 2011-02-23
11:30:49 UTC (rev 1311)
@@ -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 RiftSaw_345 testcase.
+ */
+public class RiftSaw345TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_345";
+
+ public RiftSaw345TestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(RiftSaw345TestCase.class,
+ TEST_NAME, "RiftSaw_345-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendSOAPMessage("hello_request1.xml",
+ "http://localhost:8080/RiftSaw_345WS");
+
+ result = processResult(result);
+
+ assertMessageFromFile(result, "hello_response1.xml");
+ }
+}
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.bpel
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.bpel 2011-02-23
11:30:49 UTC (rev 1311)
@@ -0,0 +1,104 @@
+<!--
+ ~ 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://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"
+ 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"
+
namespace="http://www.jboss.org/bpel/examples/wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="intf:HelloPartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="intf:HelloMessage"/>
+ <variable name="mesgVar" type="xsd:string"/>
+ </variables>
+
+ <faultHandlers>
+ <catch faultName="terminationException">
+ <empty />
+ </catch>
+ </faultHandlers>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="intf:HelloPortType"
+ operation="hello"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <flow>
+ <scope name="ScopeBeingTerminated">
+ <terminationHandler>
+ <sequence>
+ <assign name="assignHelloMesg">
+ <copy>
+ <from variable="myVar" part="TestPart"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' Terminated')</from>
+ <to variable="myVar" part="TestPart"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="intf:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+ </terminationHandler>
+ <sequence>
+ <wait><for>'PT10S'</for></wait>
+ <assign name="assignHelloMesg">
+ <copy>
+ <from variable="myVar" part="TestPart"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myVar" part="TestPart"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="intf:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+ </scope>
+ <sequence>
+ <wait><for>'PT2S'</for></wait>
+ <throw faultName="terminationException" />
+ </sequence>
+ </flow>
+ </sequence>
+</process>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/HelloWorld.wsdl 2011-02-23
11:30:49 UTC (rev 1311)
@@ -0,0 +1,67 @@
+<?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://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_345WS"/>
+ </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>
+
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/deploy.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/deploy.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/bpel/deploy.xml 2011-02-23
11:30:49 UTC (rev 1311)
@@ -0,0 +1,31 @@
+<!--
+ ~ 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:bpl="http://www.jboss.org/bpel/examples"
+
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl">
+
+
+ <process name="bpl:HelloWorld">
+ <active>true</active>
+ <process-events generate="all"/>
+ <provide partnerLink="helloPartnerLink">
+ <service name="intf:HelloService" port="HelloPort"/>
+ </provide>
+ </process>
+</deploy>
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/build.xml
(rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/build.xml 2011-02-23
11:30:49 UTC (rev 1311)
@@ -0,0 +1,30 @@
+<project name="RiftSaw_345" 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="sample.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}/${sample.jar.name}" />
+
+ <copy todir="${deploy.dir}/${ant.project.name}">
+ <fileset dir="${test.dir}/messages"/>
+ </copy>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_request1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_request1.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_request1.xml 2011-02-23
11:30:49 UTC (rev 1311)
@@ -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
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_response1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_response1.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_345/messages/hello_response1.xml 2011-02-23
11:30:49 UTC (rev 1311)
@@ -0,0 +1 @@
+<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><Test...
Terminated</TestPart></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file