You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2006/08/17 07:34:39 UTC
svn commit: r432148 - in
/incubator/tuscany/java/samples/sca/helloworldwsclient/src/test:
java/helloworld/ resources/ resources/META-INF/ resources/META-INF/tuscany/
Author: rfeng
Date: Wed Aug 16 22:34:38 2006
New Revision: 432148
URL: http://svn.apache.org/viewvc?rev=432148&view=rev
Log:
Bring up the WS client/service sample to work with the
Axis2 (w/ SDO binding)
Added:
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java (with props)
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/binding.axis2.scdl
incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
Added: incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java?rev=432148&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java (added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java Wed Aug 16 22:34:38 2006
@@ -0,0 +1,50 @@
+/*
+ * 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;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for helloworld web service client
+ */
+public class HelloWorldWSClient extends SCATestCase {
+
+ private HelloWorldService helloWorldService;
+
+ @Override
+ protected void setUp() throws Exception {
+ // FIXME: Adding extensions programtically
+ addExtension("org.apache.tuscany.binding.axis2.WebServiceBinding", getClass().getClassLoader().getResource("META-INF/tuscany/binding.axis2.scdl"));
+ addExtension("org.apache.tuscany.databinding.sdo", getClass().getClassLoader().getResource("META-INF/tuscany/databinding.sdo.scdl"));
+ super.setUp();
+ CompositeContext compositeContext = CurrentCompositeContext.getContext();
+ helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+ }
+
+ public void testWSClient() {
+ String msg = helloWorldService.getGreetings("John");
+ Assert.assertEquals("Hello John", msg);
+ }
+
+}
Propchange: incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/java/helloworld/HelloWorldWSClient.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/binding.axis2.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/binding.axis2.scdl?rev=432148&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/binding.axis2.scdl (added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/binding.axis2.scdl Wed Aug 16 22:34:38 2006
@@ -0,0 +1,40 @@
+<?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.
+-->
+<!-- Axis2 based WebService binding extension -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"
+ name="org.apache.tuscany.binding.axis2.WebServiceBinding">
+
+ <tuscany:dependency>
+ <group>axis2</group>
+ <artifact>axis2-core</artifact>
+ <version>SNAPSHOT</version>
+ </tuscany:dependency>
+
+ <component name="webservice.bindingLoader">
+ <system:implementation.system class="org.apache.tuscany.binding.axis2.WebServiceBindingLoader"/>
+ </component>
+
+ <component name="webservice.axis2.bindingBuilder">
+ <system:implementation.system class="org.apache.tuscany.binding.axis2.Axis2BindingBuilder"/>
+ </component>
+
+</composite>
Added: incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/databinding.sdo.scdl?rev=432148&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/databinding.sdo.scdl (added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclient/src/test/resources/META-INF/tuscany/databinding.sdo.scdl Wed Aug 16 22:34:38 2006
@@ -0,0 +1,34 @@
+<?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.
+-->
+<!--
+ import.sdo configuration
+
+ $Rev: 431086 $ $Date: 2006-08-12 13:58:17 -0700 (Sat, 12 Aug 2006) $
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
+ name="org.apache.tuscany.databinding.sdo">
+
+ <!-- import.sdo element loader implementations -->
+ <component name="elementLoader.import.sdo">
+ <system:implementation.system class="org.apache.tuscany.databinding.sdo.ImportSDOLoader"/>
+ </component>
+
+</composite>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org