You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sc...@apache.org on 2011/01/19 20:34:24 UTC

svn commit: r1060924 - in /tuscany/sca-java-2.x/trunk/testing/itest/ws: ./ holder-ws-service-multiple-outputs/ holder-ws-service-multiple-outputs/src/ holder-ws-service-multiple-outputs/src/main/ holder-ws-service-multiple-outputs/src/main/java/ holder...

Author: scottkurz
Date: Wed Jan 19 19:34:23 2011
New Revision: 1060924

URL: http://svn.apache.org/viewvc?rev=1060924&view=rev
Log:
Add multiple output (Holder) itests.

Added:
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
Modified:
    tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml Wed Jan 19 19:34:23 2011
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-itest</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <packaging>jar</packaging>
+    <artifactId>holder-ws-service-multiple-outputs</artifactId>
+    <name>Apache Tuscany SCA Itest - Holder Input/MultipleOutputs</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-assembly</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>     
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>     
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-api</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        
+       <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-wsdlgen</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-http</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-policy-security</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+       <plugins>
+         <plugin>
+             <groupId>org.apache.tuscany.maven.plugins</groupId>
+             <artifactId>maven-tuscany-plugin</artifactId>
+             <version>2.0-SNAPSHOT</version>
+         </plugin>
+       </plugins>
+    </build>
+</project>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.example.orderservice;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for order complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="order">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="customerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="status" type="{http://www.example.org/OrderService/}status" minOccurs="0"/>
+ *         &lt;element name="total" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ *         &lt;element name="orderId" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "order", propOrder = {
+    "customerId",
+    "status",
+    "total",
+    "orderId"
+})
+public class Order {
+
+    protected String customerId;
+    protected Status status;
+    protected double total;
+    protected int orderId;
+
+    /**
+     * Gets the value of the customerId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCustomerId() {
+        return customerId;
+    }
+
+    /**
+     * Sets the value of the customerId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCustomerId(String value) {
+        this.customerId = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Status }
+     *     
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Status }
+     *     
+     */
+    public void setStatus(Status value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the total property.
+     * 
+     */
+    public double getTotal() {
+        return total;
+    }
+
+    /**
+     * Sets the value of the total property.
+     * 
+     */
+    public void setTotal(double value) {
+        this.total = value;
+    }
+
+    /**
+     * Gets the value of the orderId property.
+     * 
+     */
+    public int getOrderId() {
+        return orderId;
+    }
+
+    /**
+     * Sets the value of the orderId property.
+     * 
+     */
+    public void setOrderId(int value) {
+        this.orderId = value;
+    }
+
+    // Added manually from wsimport generated class to improve debugging.
+    public String toString() {
+        return "Order[customerId=" + customerId + ",orderId=" + orderId + ",total=" + total + ",status=" + status.value() + "]";
+    }
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.example.orderservice;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+
+@WebService
+@Remotable
+public interface OrderService {
+
+    public String[] reviewOrder(
+        @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+        Holder<Order> myData, 
+        @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+        Holder<Float> myOutParam);
+
+    public String[] reviewOrderTwoInOuts(
+            @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+            Holder<Order> myData, 
+            @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT)
+            Holder<Float> myOutParam);
+    
+    public String[] reviewOrderTwoOutHolders(
+            @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.OUT)
+            Holder<Order> myData, 
+            @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+            Holder<Float> myOutParam);
+    
+    public String[] reviewOrderTwoInOutsThenIn(
+            @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+            Holder<Order> myData, 
+            @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT)
+            Holder<Float> myOutParam,
+            Integer myCode);   
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.example.orderservice;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@WebService
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface OrderServiceBare {
+
+    public Order bareReviewOrder(Order order);
+
+    public void bareReviewOrderInOutHolder(
+        @WebParam(mode = WebParam.Mode.INOUT)
+        Holder<Order> myData);
+    
+    public void bareReviewOrderOutHolder(
+        @WebParam(mode = WebParam.Mode.OUT)
+        Holder<Order> myData);
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,29 @@
+package org.example.orderservice;
+
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(OrderServiceBare.class)
+public class OrderServiceBareForwardImpl implements OrderServiceBare {
+
+    @Reference
+    public OrderServiceBare ref;
+
+    @Override
+    public Order bareReviewOrder(Order myData) {
+        Order retVal = ref.bareReviewOrder(myData);
+        return retVal;
+    }
+
+    @Override
+    public void bareReviewOrderInOutHolder(Holder<Order> myData) {
+        ref.bareReviewOrderInOutHolder(myData);
+    }
+
+    @Override
+    public void bareReviewOrderOutHolder(Holder<Order> myData) {
+        ref.bareReviewOrderInOutHolder(myData);
+    }
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.example.orderservice;
+
+// import org.osoa.sca.annotations.Service;
+import java.util.Random;
+
+import javax.jws.WebParam;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OrderService service.
+ */
+@Service(OrderServiceBare.class)
+public class OrderServiceBareImpl implements OrderServiceBare {
+
+    @Override
+    public Order bareReviewOrder(Order order) {
+        double total = order.getTotal();
+        Order retVal = new Order();
+        if ( total < 100.0 ) {
+            retVal.setStatus( Status.APPROVED );
+        } else if ( total > 1100.0 ) {
+            retVal.setStatus( Status.REJECTED );
+        }
+        return retVal;
+    }
+
+    @Override
+    public void bareReviewOrderInOutHolder(Holder<Order> myData) {
+        double total = myData.value.getTotal();
+        myData.value = new Order();
+        if ( total < 100.0 ) {
+            myData.value.setStatus( Status.APPROVED );
+        } else if ( total > 1100.0 ) {
+            myData.value.setStatus( Status.REJECTED );
+        }    
+    }
+
+    @Override
+    public void bareReviewOrderOutHolder(Holder<Order> myData) {
+        boolean holderEmpty = (myData.value == null ? true : false);
+        myData.value = new Order();
+        if (holderEmpty) {
+            myData.value.setStatus( Status.APPROVED );
+            myData.value.setCustomerId("approved.1234");
+        } else {
+            myData.value.setStatus( Status.REJECTED );
+        }
+    }
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,41 @@
+package org.example.orderservice;
+
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(OrderService.class)
+public class OrderServiceForwardImpl implements OrderService {
+
+	@Reference
+	public OrderService ref;
+	
+	public String[] reviewOrder(Holder<Order> myData, Holder<Float> myOutParam) {
+		String[] retVal = ref.reviewOrder(myData, myOutParam);
+		return retVal;
+	}
+
+	@Override
+	public String[] reviewOrderTwoInOuts(Holder<Order> myData,
+			Holder<Float> myOutParam) {
+		String[] retVal = ref.reviewOrderTwoInOuts(myData, myOutParam);
+		return retVal;
+	}
+
+	@Override
+	public String[] reviewOrderTwoOutHolders(Holder<Order> myData,
+			Holder<Float> myOutParam) {
+		String[] retVal = ref.reviewOrderTwoOutHolders(myData, myOutParam);
+		return retVal;
+	}
+
+	@Override
+	public String[] reviewOrderTwoInOutsThenIn(Holder<Order> myData,
+			Holder<Float> myOutParam, Integer myCode) {
+		String[] retVal = ref.reviewOrderTwoInOutsThenIn(myData, myOutParam, myCode);
+		return retVal;
+	}
+
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.example.orderservice;
+
+// import org.osoa.sca.annotations.Service;
+import java.util.Random;
+
+import javax.jws.WebParam;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OrderService service.
+ */
+@Service(OrderService.class)
+public class OrderServiceImpl implements OrderService {
+
+    /** This dummy implementation approves or rejects orders:
+     * < 100 - always approved.
+     * 100-1100 - randomly approved. Probability = (1100 - amount)/10
+     * >1100 - always rejected.
+     */
+    // public Order reviewOrder(Order order) {
+    //   @WebMethod(action = "http://www.example.org/OrderService/reviewOrder")
+    //   @RequestWrapper(localName = "reviewOrder", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrder")
+    //   @ResponseWrapper(localName = "reviewOrderResponse", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrderResponse")
+    public String[] reviewOrder(
+                                @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+                                Holder<Order> myData,
+                                @WebParam(name="myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+                                Holder<Float> myOutParam) {
+        String[] returnVal = {"retval1", "retval2"};
+        Order order = myData.value;
+        double total = order.getTotal();
+        if ( total < 100.0 ) {
+            order.setStatus( Status.APPROVED );
+        } else if ( total > 1100.0 ) {
+            order.setStatus( Status.REJECTED );
+        } else {
+            int probability = (int) ((-100.0 + total) / 10.0);
+            Random approver = new Random();
+            if ( approver.nextInt( 100 ) < probability )
+                order.setStatus( Status.APPROVED );
+            else
+                order.setStatus( Status.REJECTED );
+        }        
+        System.out.println( ">>> OrderService.reviewOrder return=" + order );
+
+        if ( myOutParam.value == null ) {
+            myOutParam.value = new Float("97");
+        } else {
+            myOutParam.value = new Float("-1000");
+        }
+        return returnVal;
+    }
+
+    @Override
+    public String[] reviewOrderTwoInOuts(Holder<Order> myData,
+                                         Holder<Float> myOutParam) {
+        String[] returnVal = {"retval1", "retval2"};
+        Order order = myData.value;
+        double total = order.getTotal();
+        if ( total < 100.0 ) {
+            order.setStatus( Status.APPROVED );
+        } else if ( total > 1100.0 ) {
+            order.setStatus( Status.REJECTED );
+        } else {
+            int probability = (int) ((-100.0 + total) / 10.0);
+            Random approver = new Random();
+            if ( approver.nextInt( 100 ) < probability )
+                order.setStatus( Status.APPROVED );
+            else
+                order.setStatus( Status.REJECTED );
+        }        
+        System.out.println( ">>> OrderService.reviewOrder return=" + order );
+
+        // Since this is an INOUT, expect "111" to signify test pass
+        if ( myOutParam.value.equals(new Float("111"))) {
+            myOutParam.value = new Float("97");
+        } else {
+            myOutParam.value = new Float("-1000");
+        }
+        return returnVal;
+    }
+
+    @Override
+    public String[] reviewOrderTwoOutHolders(Holder<Order> myData,
+                                             Holder<Float> myOutParam) {			
+        String[] returnVal = {"retval1", "retval2"};            	
+        if (myData.value == null) {
+            myData.value = new Order();
+            myData.value.setStatus(Status.REJECTED);
+        } else {
+            // Do nothing so test logic will fail
+        }
+
+        // Use test logic to check it's truly treated as an OUT parm
+        if ( myOutParam.value == null ) {
+            myOutParam.value = new Float("97");
+        } else {
+            myOutParam.value = new Float("-1000");
+        }
+        return returnVal;
+    }
+
+    @Override
+    public String[] reviewOrderTwoInOutsThenIn(Holder<Order> myData,
+                                               Holder<Float> myOutParam, 
+                                               Integer myCode) {
+        String[] returnVal = {"retval1", "retval2"};
+        Order order = myData.value;
+        double total = order.getTotal();
+        if ( total < 50.1 && myCode.equals(new Integer("23")) ) {
+            order.setStatus( Status.APPROVED );
+        } else {
+            order.setStatus( Status.REJECTED); 
+        }
+
+        // Use test logic to check it's truly treated as an INOUT parm
+        if ( myOutParam.value != null ) {
+            myOutParam.value = new Float("97");
+        } else {
+            myOutParam.value = new Float("-1000");
+        }
+        return returnVal;
+    }
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.example.orderservice;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for status.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="status">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="Created"/>
+ *     &lt;enumeration value="Submitted"/>
+ *     &lt;enumeration value="Approved"/>
+ *     &lt;enumeration value="Rejected"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "status")
+@XmlEnum
+public enum Status {
+
+    @XmlEnumValue("Created")
+    CREATED("Created"),
+    @XmlEnumValue("Submitted")
+    SUBMITTED("Submitted"),
+    @XmlEnumValue("Approved")
+    APPROVED("Approved"),
+    @XmlEnumValue("Rejected")
+    REJECTED("Rejected");
+    private final String value;
+
+    Status(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static Status fromValue(String v) {
+        for (Status c: Status.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite Wed Jan 19 19:34:23 2011
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+	targetNamespace="http://orderservice"
+	xmlns:hw="http://orderservice"
+    name="orderws.bare">
+
+    <component name="OrderServiceBareComponent">
+        <implementation.java class="org.example.orderservice.OrderServiceBareImpl" />
+	    <service name="OrderServiceBare">
+	        <interface.java interface="org.example.orderservice.OrderServiceBare"/>
+	        <binding.sca name="sca"/>
+            <binding.ws/>
+	    </service>
+    </component>
+
+	<component name="OrderServiceBareForwardComponent">
+        <implementation.java class="org.example.orderservice.OrderServiceBareForwardImpl" />
+	    <reference name="ref">
+	        <binding.ws uri="http://localhost:8080/OrderServiceBareComponent/OrderServiceBare"/>	      
+	    </reference>
+    </component>
+    
+</composite>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite Wed Jan 19 19:34:23 2011
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+	targetNamespace="http://orderservice"
+	xmlns:hw="http://orderservice"
+    name="orderws">
+
+    <component name="OrderServiceComponent">
+        <implementation.java class="org.example.orderservice.OrderServiceImpl" />
+	    <service name="OrderService">
+	        <interface.java interface="org.example.orderservice.OrderService"/>
+	        <binding.sca name="sca"/>
+            <binding.ws/>
+	    </service>
+    </component>
+
+	<component name="OrderServiceForwardComponent">
+        <implementation.java class="org.example.orderservice.OrderServiceForwardImpl" />
+	    <reference name="ref">
+	        <binding.ws uri="http://localhost:8080/OrderServiceComponent/OrderService"/>	      
+	    </reference>
+    </component>
+    
+</composite>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.example.orderservice;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import javax.xml.ws.Holder;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests that the order server responds.
+ */
+public class OrderServiceBareTestCase {
+
+    private Node node;
+
+    @Before
+    public void startServer() throws Exception {
+        try {
+
+            NodeFactory factory = NodeFactory.newInstance();
+            String contribution = ContributionLocationHelper.getContributionLocation(OrderServiceBare.class);
+            node = factory.createNode("ordersca.bare.composite", new Contribution("order.bare", contribution)).start();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+     
+    }
+
+    @Test
+    public void testOrderReviewBareApprovedSCA() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewApproved(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewBareApprovedWS() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewApproved(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewBareRejectedSCA() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewRejected(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewBareRejectedWS() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewRejected(orderServiceBare);
+    }
+
+    
+    @Test
+    public void testOrderReviewInOutBareApprovedSCA() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewApprovedInOutHolder(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewInOutBareApprovedWS() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewApprovedInOutHolder(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewInOutBareRejectedSCA() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewRejectedInOutHolder(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewInOutBareRejectedWS() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewRejectedInOutHolder(orderServiceBare);
+    }    
+    
+    @Test
+    public void testOrderReviewOutHolderSCA() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewOutHolder(orderServiceBare);    
+    }
+
+    @Test
+    public void testOrderReviewOutHolderWS() throws IOException {
+        OrderServiceBare orderServiceBare =
+            node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+        assertNotNull(orderServiceBare);            
+        testOrderReviewOutHolder(orderServiceBare);
+    }
+
+    private void testOrderReviewApproved(OrderServiceBare orderServiceBare) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust1234");
+        order.setTotal( 50.0 );
+        
+        Order returnValue = null;
+        returnValue = orderServiceBare.bareReviewOrder(order);
+        assertTrue( returnValue.getStatus() == Status.APPROVED );   
+    }
+
+    private void testOrderReviewRejected(OrderServiceBare orderServiceBare) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust1234");
+        order.setTotal( 50000.0 );
+        
+        Order returnValue = null;
+        returnValue = orderServiceBare.bareReviewOrder(order);
+        assertTrue( returnValue.getStatus() == Status.REJECTED );   
+    }
+
+    private void testOrderReviewApprovedInOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+        String customerId = "cust1234";
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId(customerId);
+        order.setTotal( 50.0 );
+        
+        Holder<Order> holder = new Holder<Order>(order);
+        orderServiceBare.bareReviewOrderInOutHolder(holder);
+        assertTrue( holder.value.getStatus() == Status.APPROVED );
+        assertTrue( holder.value.getCustomerId().equals(customerId));
+    }
+
+    private void testOrderReviewRejectedInOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+        String customerId = "cust1234";
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId(customerId);
+        order.setTotal( 50000.0 );
+        
+        Holder<Order> holder = new Holder<Order>(order);
+        orderServiceBare.bareReviewOrderInOutHolder(holder);    
+        assertTrue( holder.value.getStatus() == Status.REJECTED );   
+        assertTrue( holder.value.getCustomerId().equals(customerId));
+    }
+
+    private void testOrderReviewOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust1234");
+        order.setTotal( 50.0 );
+        Holder<Order> holder = new Holder<Order>(order);
+        orderServiceBare.bareReviewOrderOutHolder(holder);
+        assertTrue( holder.value.getStatus() == Status.APPROVED );   
+        assertTrue( holder.value.getCustomerId().equals("approved.1234"));
+    }        
+
+    
+    @After
+    public void stopServer() throws Exception {
+        if (node != null)
+            node.stop();
+    }
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java?rev=1060924&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java Wed Jan 19 19:34:23 2011
@@ -0,0 +1,305 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.example.orderservice;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import javax.xml.ws.Holder;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests that the order server responds.
+ */
+public class OrderServiceTestCase {
+
+    private Node node;
+
+    @Before
+    public void startServer() throws Exception {
+        try {
+
+            NodeFactory factory = NodeFactory.newInstance();
+            String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class);
+            node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+     
+    }
+
+    @Test
+    public void testOrderReviewApprovedSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));        
+        testOrderReviewApproved(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewApprovedWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));        
+        testOrderReviewApproved(orderService, outParam);
+    }
+ 
+    @Test
+    public void testOrderReviewRejectedSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));        
+        testOrderReviewRejected(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRejectedWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));        
+        testOrderReviewRejected(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRandomSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+        testOrderReviewRandom(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRandomWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+        testOrderReviewRandom(orderService, outParam);
+    }
+
+    
+    
+    @Test
+    public void testOrderReviewApprovedTwoInOutsSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));        
+        testOrderReviewApproved(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewApprovedTwoInOutsWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));        
+        testOrderReviewApproved(orderService, outParam);
+    }
+ 
+    @Test
+    public void testOrderReviewRejectedTwoInOutsSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));        
+        testOrderReviewRejected(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRejectedTwoInOutsWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));        
+        testOrderReviewRejected(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRandomTwoInOutsSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));
+        testOrderReviewRandom(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewRandomTwoInOutsWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        Holder<Float> outParam = new Holder<Float>(new Float(111));
+        testOrderReviewRandom(orderService, outParam);
+    }
+
+    @Test
+    public void testOrderReviewTwoOutHoldersSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        testOrderReviewTwoOutHolders(orderService);
+    }
+
+    @Test
+    public void testOrderReviewTwoOutHoldersWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        testOrderReviewTwoOutHolders(orderService);
+    }
+
+    @Test
+    public void testOrderReviewTwoInOutsThenInSCA() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+        assertNotNull(orderService);
+        testOrderReviewOrderTwoInOutsThenIn(orderService);
+    }
+    
+    @Test
+    public void testOrderReviewTwoInOutsThenInWS() throws IOException {
+        OrderService orderService =
+            node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+        assertNotNull(orderService);
+        testOrderReviewOrderTwoInOutsThenIn(orderService);
+    }
+    
+    private void testOrderReviewApproved(OrderService orderService, Holder<Float> outParam) throws IOException {    
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust1234");
+        order.setTotal( 50.0 );
+
+        System.out.println( ">>> Order submitted=" + order );
+        Holder<Order> holder = new Holder<Order>( order );
+        String[] returnValue = null;
+        if (outParam.value.equals(new Float("111"))) {
+        	returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+        } else {
+        	returnValue = orderService.reviewOrder( holder, outParam );
+        }
+        System.out.println( ">>> Order returned=" + holder.value );
+        assertTrue( holder.value.getStatus() == Status.APPROVED );
+        assertEquals("retval1", returnValue[0]);
+        assertEquals("retval2", returnValue[1]);
+        assertTrue(outParam.value.floatValue() == 97);
+    }
+
+    private void testOrderReviewRejected(OrderService orderService, Holder<Float> outParam) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust2345");
+        order.setTotal( 50000.0 );
+
+        System.out.println( ">>> Order submitted=" + order );
+        Holder<Order> holder = new Holder<Order>( order );
+        String[] returnValue = null;
+        if (outParam.value.equals(new Float("111"))) {
+        	returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+        } else {
+        	returnValue = orderService.reviewOrder( holder, outParam );
+        }
+        System.out.println( ">>> Order returned=" + holder.value );
+        System.out.println( ">>> return values: " + returnValue[0] + " " + returnValue[1]);
+        assertTrue( holder.value.getStatus() == Status.REJECTED );
+        assertEquals("retval1", returnValue[0]);
+        assertEquals("retval2", returnValue[1]);
+        assertTrue(outParam.value.floatValue() == 97);
+    }
+
+    private void testOrderReviewRandom(OrderService orderService, Holder<Float> outParam) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust3456");
+        order.setTotal( 600.0 );
+        
+        System.out.println( ">>> Order submitted=" + order );
+        Holder<Order> holder = new Holder<Order>( order );
+        String[] returnValue = null;
+        if (outParam.value.equals(new Float("111"))) {
+        	returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+        } else {
+        	returnValue = orderService.reviewOrder( holder, outParam );
+        }
+        System.out.println( ">>> Order returned=" + holder.value );
+        assertTrue( holder.value.getStatus() != Status.CREATED );
+        assertEquals("retval1", returnValue[0]);
+        assertEquals("retval2", returnValue[1]);
+        assertTrue(outParam.value.floatValue() == 97);
+    }
+
+    private void testOrderReviewTwoOutHolders(OrderService orderService) throws IOException {
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust3456");
+        order.setTotal( 600.0 );
+        
+        System.out.println( ">>> Order submitted=" + order );
+        Holder<Order> holder = new Holder<Order>( order );
+        Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+        String[] returnValue = orderService.reviewOrderTwoOutHolders( holder, outParam );
+        System.out.println( ">>> Order returned=" + holder.value );
+        assertTrue( holder.value.getStatus() == Status.REJECTED  );
+        assertEquals("retval1", returnValue[0]);
+        assertEquals("retval2", returnValue[1]);
+        assertTrue(outParam.value.floatValue() == 97);
+    }
+    
+    private void testOrderReviewOrderTwoInOutsThenIn(OrderService orderService) throws IOException {    
+        Order order = new Order();
+        order.setStatus( Status.CREATED );
+        order.setCustomerId("cust1234");
+        order.setTotal( 50.0 );
+
+        System.out.println( ">>> Order submitted=" + order );
+        Holder<Order> holder = new Holder<Order>( order );
+        Holder<Float> outParam = new Holder<Float>( new Float("1820.234"));
+        String[] returnValue = null;
+        Integer checkForMe = new Integer("23");
+        returnValue = orderService.reviewOrderTwoInOutsThenIn( holder, outParam, checkForMe);
+        System.out.println( ">>> Order returned=" + holder.value );
+        assertTrue( holder.value.getStatus() == Status.APPROVED );
+        assertEquals("retval1", returnValue[0]);
+        assertEquals("retval2", returnValue[1]);
+        assertTrue(outParam.value.floatValue() == 97);
+    }
+    
+    @After
+    public void stopServer() throws Exception {
+        if (node != null)
+            node.stop();
+    }
+
+}

Modified: tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml?rev=1060924&r1=1060923&r2=1060924&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml Wed Jan 19 19:34:23 2011
@@ -36,6 +36,7 @@
     <module>wsdl</module>
     <module>endpoints</module>
     <module>endpoint-references</module>
+    <module>holder-ws-service-multiple-outputs</module>
 <!--
     <module>jms</module>
     <module>mtom</module>