You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/02/22 04:19:20 UTC

svn commit: r510366 - in /incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples: helloworldws-om/src/test/java/helloworld/ helloworldws-om/src/test/java/helloworld/om/ helloworldwsclient-om/src/test/java/helloworld/ helloworldwsc...

Author: jsdelfino
Date: Wed Feb 21 19:19:19 2007
New Revision: 510366

URL: http://svn.apache.org/viewvc?view=rev&rev=510366
Log:
Cleaned up helloworldws-om and helloworldwsclient-om. Use lowercase package names, make the namespaces and package names match, adjust names of the composites. I missed a few updates in the previous commit.

Added:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java   (with props)
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java   (with props)
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java   (with props)
Removed:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworldOM/

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java?view=auto&rev=510366
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java Wed Feb 21 19:19:19 2007
@@ -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 helloworld.om;
+
+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("META-INF/sca/helloworldws-om.composite");
+		super.setUp();
+	}
+	
+	public void testPing() throws IOException {
+		new Socket("127.0.0.1", 8080);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldws-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java?view=auto&rev=510366
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java Wed Feb 21 19:19:19 2007
@@ -0,0 +1,71 @@
+/*
+ * 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 helloworld.om;
+
+import helloworld.om.HelloWorldService;
+import junit.framework.Assert;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+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 helloworld web service client
+ */
+public class HelloWorldClientTestCase extends SCATestCase {
+
+    private HelloWorldService helloWorldService;
+
+    private SCATestCaseRunner server;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        CompositeContext compositeContext = CurrentCompositeContext.getContext();
+        helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+
+        server = new SCATestCaseRunner(HelloWorldServerTestCase.class);
+        server.setUp();
+    }
+
+    public void testWSClient() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+        OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+        requestOM.addChild(parmE);
+        parmE.addChild(fac.createOMText("petra"));
+        OMElement responseOM = helloWorldService.getGreetings(requestOM);
+        OMElement child = (OMElement)responseOM.getFirstElement();
+        Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        server.tearDown();
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldClientTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java?view=auto&rev=510366
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java Wed Feb 21 19:19:19 2007
@@ -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 helloworld.om;
+
+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("META-INF/sca/helloworldws-om.composite");
+		super.setUp();
+	}
+	
+	public void testPing() throws IOException {
+		new Socket("127.0.0.1", 8080);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient-om/src/test/java/helloworld/om/HelloWorldServerTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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