summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-integration/samples/sca/echo-databinding/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-integration/samples/sca/echo-databinding/src/test')
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentAImpl.java94
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentBImpl.java59
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Echo.java32
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java49
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface1.java32
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface2.java36
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/EchoDataBinding.composite61
-rw-r--r--branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/wsdl/echo.wsdl45
8 files changed, 0 insertions, 408 deletions
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentAImpl.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentAImpl.java
deleted file mode 100644
index 84466f90d0..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentAImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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 echo;
-
-import org.apache.axiom.om.OMElement;
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-
-/**
- * @version $Rev$ $Date$
- */
-public class ComponentAImpl implements Interface1 {
-
- private Interface1 componentBReference;
-
- private String prefix;
-
- private String prefix1;
-
- private String bar;
-
- private OMElement omProperty;
-
- @Constructor
- public ComponentAImpl(@Reference(name = "componentBReference", required = true)
- Interface1 componentBReference) {
- this.componentBReference = componentBReference;
- }
-
- public Object call(Object msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentA --> Received message: " + request);
- Object ret = componentBReference.call(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentA --> Returned message: " + response);
- return ret;
- }
-
- public Object call1(Object msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentA --> Received message: " + request);
- Object ret = componentBReference.call1(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentA --> Returned message: " + response);
- return ret;
- }
-
- @Property(name="prefix")
- public void setPrefix(String prefix) {
- System.out.println("[Property] prefix: " + prefix);
- this.prefix = prefix;
- }
-
- @Property(name="prefix1")
- public void setPrefix1(String prefix1) {
- System.out.println("[Property] prefix1: " + prefix1);
- this.prefix1 = prefix1;
- }
-
- /**
- * @param bar the bar to set
- */
- @Property(name="bar")
- public void setBar(String bar) {
- System.out.println("[Property] bar: " + bar);
- this.bar = bar;
- }
-
- /**
- * @param omProperty the omProperty to set
- */
- @Property(name="omProperty")
- public void setOmProperty(OMElement omProperty) {
- this.omProperty = omProperty;
- }
-
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentBImpl.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentBImpl.java
deleted file mode 100644
index f8783d39e9..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/ComponentBImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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 echo;
-
-import javax.xml.stream.XMLStreamReader;
-
-import org.osoa.sca.annotations.AllowsPassByReference;
-import org.osoa.sca.annotations.Constructor;
-import org.osoa.sca.annotations.Reference;
-import org.w3c.dom.Node;
-
-/**
- * @version $Rev$ $Date$
- */
-@AllowsPassByReference
-public class ComponentBImpl implements Interface2 {
-
- private Echo echoReference;
-
- @Constructor
- public ComponentBImpl(@Reference(name = "echoReference", required = true)
- Echo echoReference) {
- this.echoReference = echoReference;
- }
-
- public Node call(Node msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentB --> Received message: " + request);
- Node ret = (Node) echoReference.echo(msg);
- String response = ret + " [" + ret.getClass().getName() + "]";
- System.out.println("ComponentB --> Returned message: " + response);
- return ret;
- }
-
- public XMLStreamReader call1(XMLStreamReader msg) {
- String request = msg + " [" + msg.getClass().getName() + "]";
- System.out.println("ComponentB --> Received message: " + request);
-// XMLStreamReader ret = (XMLStreamReader) echoReference.echo(msg);
- String response = request;
- System.out.println("ComponentB --> Returned message: " + response);
- return msg;
- }
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Echo.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Echo.java
deleted file mode 100644
index f6d10d55c7..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Echo.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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 echo;
-
-import org.apache.tuscany.api.annotation.DataType;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * @version $Rev$ $Date$
- */
-// @DataType(name="org.apache.axiom.om.OMElement")
-@DataType(name="org.w3c.dom.Node")
-@Remotable
-public interface Echo {
- Object echo(Object msg);
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java
deleted file mode 100644
index f15501a9a5..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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 echo;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- * @version $Rev$ $Date$
- */
-public class EchoDataBindingTestCase extends TestCase {
-
- private Interface1 componentA;
-
- public void testTransform() {
- componentA.call("<message><foo>123</foo></message>");
- componentA.call1("<message><foo>123</foo></message>");
- }
-
- protected void setUp() throws Exception {
- SCARuntime.start("EchoDataBinding.composite");
-
- CompositeContext context = CurrentCompositeContext.getContext();
- componentA = context.locateService(Interface1.class, "ComponentA");
- }
-
- protected void tearDown() throws Exception {
- SCARuntime.stop();
- }
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface1.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface1.java
deleted file mode 100644
index bce5dd46cb..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface1.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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 echo;
-
-import org.apache.tuscany.api.annotation.DataType;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * @version $Rev$ $Date$
- */
-@DataType(name="java.lang.String")
-@Remotable
-public interface Interface1 {
- Object call(Object msg);
- Object call1(Object msg);
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface2.java b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface2.java
deleted file mode 100644
index c2f82971e9..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/Interface2.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 echo;
-
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.tuscany.api.annotation.DataType;
-import org.osoa.sca.annotations.Remotable;
-import org.w3c.dom.Node;
-
-/**
- * @version $Rev$ $Date$
- */
-@DataType(name="org.w3c.dom.Node")
-@Remotable
-public interface Interface2 {
- Node call(Node msg);
- @DataType(name="javax.xml.stream.XMLStreamReader")
- XMLStreamReader call1(XMLStreamReader msg);
-}
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/EchoDataBinding.composite b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/EchoDataBinding.composite
deleted file mode 100644
index e3407e4ab7..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/EchoDataBinding.composite
+++ /dev/null
@@ -1,61 +0,0 @@
-<?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:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:f="http://foo"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" name="EchoDataBinding">
-
- <service name="EchoService">
- <interface.java class="echo.Interface1" />
- <binding.echo />
- <reference>ComponentB</reference>
- </service>
-
- <component name="ComponentA">
- <implementation.java class="echo.ComponentAImpl" />
- <reference name="componentBReference" target="ComponentB"></reference>
- <property name="prefix">ABC</property>
- <property name="prefix1" source="$messagePrefix"></property>
- <property name="bar" source="$complexProperty/*[local-name()='foo']/*[local-name()='bar']"></property>
- <property name="omProperty"><a><b>XYZ</b></a></property>
- </component>
-
- <component name="ComponentB">
- <implementation.java class="echo.ComponentBImpl" />
- </component>
-
- <reference name="EchoReference" promote="ComponentB/echoReference">
- <!--
- <interface.java interface="echo.Echo"/>
- -->
- <interface.wsdl interface="http://example.com/echo.wsdl#wsdl.interface(EchoPortType)" wsdli:wsdlLocation="http://example.com/echo.wsdl wsdl/echo.wsdl">
- <db:databinding xmlns:db="http://tuscany.apache.org/xmlns/sca/databinding/1.0" name="org.apache.axiom.om.OMElement"/>
- </interface.wsdl>
- <binding.echo />
- </reference>
-
- <property name="messagePrefix" type="xsd:string">ABC</property>
- <property name="complexProperty" type="f:FooType">
- <foo>
- <bar attr="barAttr">BAR</bar>
- </foo>
- </property>
-
-</composite>
diff --git a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/wsdl/echo.wsdl b/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/wsdl/echo.wsdl
deleted file mode 100644
index 5749bd8aff..0000000000
--- a/branches/sca-java-integration/samples/sca/echo-databinding/src/test/resources/wsdl/echo.wsdl
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<definitions name="StockQuote" targetNamespace="http://example.com/echo.wsdl" xmlns:tns="http://example.com/echo.wsdl"
- xmlns:xsd1="http://example.com/echo.xsd" xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://example.com/echo.xsd" xmlns:tns="http://example.com/echo.xsd"
- xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="messageType">
- <sequence>
- <element name="foo" type="string"></element>
- </sequence>
- </complexType>
- <element name="echo">
- <complexType>
- <sequence>
- <element name="message" type="tns:messageType" />
- </sequence>
- </complexType>
- </element>
- <element name="echoResponse">
- <complexType>
- <sequence>
- <element name="message" type="tns:messageType" />
- </sequence>
- </complexType>
- </element>
- </schema>
- </types>
-
- <message name="EchoInput">
- <part name="body" element="xsd1:echo" />
- </message>
-
- <message name="EchoOutput">
- <part name="body" element="xsd1:echoResponse" />
- </message>
-
- <portType name="EchoPortType">
- <operation name="echo">
- <input message="tns:EchoInput" />
- <output message="tns:EchoOutput" />
- </operation>
- </portType>
-
-</definitions> \ No newline at end of file