You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/03/02 13:25:40 UTC

svn commit: r513730 - in /incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src: main/resources/ main/resources/wsdl/ test/java/org/apache/tuscany/sca/itest/

Author: antelder
Date: Fri Mar  2 04:25:39 2007
New Revision: 513730

URL: http://svn.apache.org/viewvc?view=rev&rev=513730
Log:
Interim checkin of WS binding itests - don't all work yet

Added:
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleReference.composite
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleService.composite
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/reference.composite
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl   (with props)
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java   (with props)
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java   (with props)
Modified:
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/WSBindingTest.composite
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/helloworldws.composite
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/HelloWorldServerTestCase.java
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/WSReferencesTestCase.java

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleReference.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleReference.composite?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleReference.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleReference.composite Fri Mar  2 04:25:39 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+
+           name="OldStyleReference">
+   
+    <component name="HelloworldClient">
+      <implementation.java class="helloworld.HelloWorldServiceComponent"/>
+      <reference name="helloWorldService">HelloworldClientRef</reference>
+    </component>
+
+    <reference name="HelloworldClientRef">
+        <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" 
+            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
+        <binding.ws endpoint="http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
+			location="wsdl/helloworld.wsdl" />
+    </reference>
+    
+</composite>

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleService.composite?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleService.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/OldStyleService.composite Fri Mar  2 04:25:39 2007
@@ -0,0 +1,35 @@
+<?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://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+
+    name="OldStyleService">
+    
+    <service name="HelloWorldWebService">
+        <interface.java class="helloworld.HelloWorldService" />
+        <!-- interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" / -->
+        <binding.ws endpoint="http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)" location="wsdl/helloworld.wsdl" />
+        <reference>HelloWorldServiceComponent</reference>
+    </service>
+
+    <component name="HelloWorldServiceComponent">
+        <implementation.java class="helloworld.HelloWorldImpl" />
+    </component>
+
+</composite>

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/WSBindingTest.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/WSBindingTest.composite?view=diff&rev=513730&r1=513729&r2=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/WSBindingTest.composite (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/WSBindingTest.composite Fri Mar  2 04:25:39 2007
@@ -64,7 +64,18 @@
     <reference name="HelloworldClientServiceSimplestRef">
         <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" 
             wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
-        <binding.ws uri="http://localhost:8080/services/HelloWorldWebServiceSimplest"/>
+        <binding.ws uri="http://localhost:8080/services/HelloWorldServiceComponent/HelloWorldWebService"/>
+    </reference>
+
+    <component name="HelloworldClientServiceDefaultName">
+      <implementation.java class="helloworld.HelloWorldServiceComponent"/>
+      <reference name="helloWorldService">HelloworldClientServiceDefaultNameRef</reference>
+    </component>
+
+    <reference name="HelloworldClientServiceDefaultNameRef">
+        <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" 
+            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
+        <binding.ws uri="http://localhost:8080/HelloWorldServiceComponent/HelloWorldWebService"/>
     </reference>
 
 </composite>

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/helloworldws.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/helloworldws.composite?view=diff&rev=513730&r1=513729&r2=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/helloworldws.composite (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/helloworldws.composite Fri Mar  2 04:25:39 2007
@@ -39,6 +39,12 @@
         <reference>HelloWorldServiceComponent</reference>
     </service>
 
+    <service name="HelloWorldWebServiceDefaultName">
+        <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
+        <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"/>
+        <reference>HelloWorldServiceComponent</reference>
+    </service>
+
     <component name="HelloWorldServiceComponent">
         <implementation.java class="helloworld.HelloWorldImpl" />
     </component>

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/reference.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/reference.composite?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/reference.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/reference.composite Fri Mar  2 04:25:39 2007
@@ -0,0 +1,36 @@
+<?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://www.osoa.org/xmlns/sca/1.0"
+           xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+
+           name="WSBindingTest">
+   
+    <component name="HelloworldClientSimplest">
+      <implementation.java class="helloworld.HelloWorldServiceComponent"/>
+      <reference name="helloWorldService">HelloworldClientRefSimplest</reference>
+    </component>
+
+    <reference name="HelloworldClientRefSimplest">
+        <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" 
+            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
+        <binding.ws/>
+    </reference>
+
+</composite>

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl Fri Mar  2 04:25:39 2007
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	name="helloworld">
+
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+            <element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="name" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getGreetingsRequest">
+        <wsdl:part element="tns:getGreetings" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:message name="getGreetingsResponse">
+        <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:portType name="HelloWorld">
+        <wsdl:operation name="getGreetings">
+            <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+            <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="getGreetings">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="getGreetingsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="getGreetingsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="HelloWorldService">
+        <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+            <wsdlsoap:address location="http://localhost:8080/HelloWorldServiceComponent"/>
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/main/resources/wsdl/helloworld2.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/HelloWorldServerTestCase.java?view=diff&rev=513730&r1=513729&r2=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/HelloWorldServerTestCase.java Fri Mar  2 04:25:39 2007
@@ -1,26 +1,49 @@
+/*
+ * 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.apache.tuscany.sca.itest;
 
-
 import java.io.IOException;
 import java.net.Socket;
 
 import org.apache.tuscany.test.SCATestCase;
 
 public class HelloWorldServerTestCase extends SCATestCase {
-	
-	@Override
-	protected void setUp() throws Exception {
-		setApplicationSCDL("helloworldws.composite");
-		super.setUp();
-	}
-	
-	public void testPing() throws IOException, InterruptedException {
-		new Socket("127.0.0.1", 8080);
-	}
-	
-	@Override
-	protected void tearDown() throws Exception {
-		super.tearDown();
-	}
+
+    private String composteFileName;
+
+    public HelloWorldServerTestCase(String composteFileName) {
+        this.composteFileName = composteFileName;
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        setApplicationSCDL(composteFileName);
+        super.setUp();
+    }
+
+    public void testPing() throws IOException, InterruptedException {
+        new Socket("127.0.0.1", 8080);
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
 
 }

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java Fri Mar  2 04:25:39 2007
@@ -0,0 +1,65 @@
+/*
+ * 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.apache.tuscany.sca.itest;
+
+
+import helloworld.HelloWorldService;
+import junit.framework.Assert;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.test.SCATestCaseRunner;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for binding.ws using pre-1.0 WS SCDL
+ */
+@SuppressWarnings("deprecation")
+public class OldStyleTestCase extends SCATestCase {
+
+    private SCATestCaseRunner server;
+    private CompositeContext compositeContext;
+
+    private static final String CLIENT_COMPOSITE = "OldStyleReference.composite";
+    private static final String SERVICE_COMPOSITE = "OldStyleService.composite";
+    private static final String CLIENT_COMPONENT = "HelloworldClient";
+
+    public void testCallingWSWithOldStyleSCDL() throws Exception {
+        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, CLIENT_COMPONENT);
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("Hi Petra", msg);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        setApplicationSCDL(CLIENT_COMPOSITE);
+        super.setUp();
+        compositeContext = CurrentCompositeContext.getContext();
+
+        server =  new SCATestCaseRunner(HelloWorldServerTestCase.class, SERVICE_COMPOSITE);
+        server.setUp();
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	super.tearDown();
+    	server.tearDown();
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/OldStyleTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java?view=auto&rev=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java Fri Mar  2 04:25:39 2007
@@ -0,0 +1,62 @@
+/*
+ * 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.apache.tuscany.sca.itest;
+
+
+import helloworld.HelloWorldService;
+import junit.framework.Assert;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.test.SCATestCaseRunner;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for binding.ws references 
+ */
+@SuppressWarnings("deprecation")
+public class ReferenceTestCase extends SCATestCase {
+
+    private SCATestCaseRunner server;
+    private CompositeContext compositeContext;
+
+    @Override
+    protected void setUp() throws Exception {
+        server =  new SCATestCaseRunner(HelloWorldServerTestCase.class);
+
+        setApplicationSCDL("reference.composite");
+        super.setUp();
+        compositeContext = CurrentCompositeContext.getContext();
+
+        server.setUp();
+    }
+    
+    public void testWSClient() throws Exception {
+        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientSimplest");
+        String msg = helloWorldService.getGreetings("Petra");
+        Assert.assertEquals("Hi Petra", msg);
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	super.tearDown();
+    	server.tearDown();
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/ReferenceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/WSReferencesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/WSReferencesTestCase.java?view=diff&rev=513730&r1=513729&r2=513730
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/WSReferencesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsBindingTest/src/test/java/org/apache/tuscany/sca/itest/WSReferencesTestCase.java Fri Mar  2 04:25:39 2007
@@ -1,3 +1,21 @@
+/*
+ * 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.apache.tuscany.sca.itest;
 
 
@@ -29,26 +47,32 @@
         server.setUp();
     }
     
-    public void testWSClient() throws Exception {
-        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientOld");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("Hi Petra", msg);
-    }
-    
-    public void testWSClientSimplest() throws Exception {
-        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientSimplest");
-        String msg = helloWorldService.getGreetings("Petra");
-        Assert.assertEquals("Hi Petra", msg);
-    }
+//    public void testWSClient() throws Exception {
+//        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientOld");
+//        String msg = helloWorldService.getGreetings("Petra");
+//        Assert.assertEquals("Hi Petra", msg);
+//    }
+//    
+//    public void testWSClientSimplest() throws Exception {
+//        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientSimplest");
+//        String msg = helloWorldService.getGreetings("Petra");
+//        Assert.assertEquals("Hi Petra", msg);
+//    }
+//
+//    public void testWSClientURI() throws Exception {
+//        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientURI");
+//        String msg = helloWorldService.getGreetings("Petra");
+//        Assert.assertEquals("Hi Petra", msg);
+//    }
 
-    public void testWSClientURI() throws Exception {
-        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientURI");
+    public void testWSClientServiceSimplest() throws Exception {
+        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientServiceSimplest");
         String msg = helloWorldService.getGreetings("Petra");
         Assert.assertEquals("Hi Petra", msg);
     }
 
-    public void testWSClientServiceSimplest() throws Exception {
-        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientServiceSimplest");
+    public void testWSClientServiceDefaultName() throws Exception {
+        HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloworldClientServiceDefaultName");
         String msg = helloWorldService.getGreetings("Petra");
         Assert.assertEquals("Hi Petra", msg);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org