diff options
Diffstat (limited to 'tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly')
21 files changed, 0 insertions, 978 deletions
diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/impl/JavaImplementationTestCase.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/impl/JavaImplementationTestCase.java deleted file mode 100644 index d916f67050..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/impl/JavaImplementationTestCase.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.impl; - -import java.util.List; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl; -import org.apache.tuscany.container.java.assembly.mock.HelloWorldImpl; -import org.apache.tuscany.container.java.assembly.mock.HelloWorldWithFieldProperties; -import org.apache.tuscany.container.java.assembly.mock.NakedHelloWorld; -import org.apache.tuscany.container.java.assembly.mock.NakedHelloWorldWithInterface; -import org.apache.tuscany.model.assembly.ComponentType; -import org.apache.tuscany.model.assembly.Property; -import org.apache.tuscany.model.assembly.Service; -import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl; -import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl; -import org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl; - -/** - * @version $Rev$ $Date$ - */ -public class JavaImplementationTestCase extends TestCase { - private JavaImplementationImpl impl = (JavaImplementationImpl) new JavaAssemblyFactoryImpl().createJavaImplementation(); - - public void testFoo() { - impl.setImplementationClass(HelloWorldImpl.class); - - // this is not needed anymore - //assertEquals("org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.componentType", impl.getComponentTypeName()); - } - - public void testNoImplementationClass() { - //FIXME this test fails with NPE -// impl.setImplementationClass(null); -// try { -// impl.initialize(new AssemblyModelContextImpl(new AssemblyLoaderImpl(), ResourceLoaderFactory.getResourceLoader(Thread.currentThread().getContextClassLoader()))); -// impl.getComponentType(); -// fail("Expected IllegalArgumentException"); -// } catch (IllegalArgumentException e) { -// // ok -// } - } - - public void testNakedHelloWorld() { - impl.setImplementationClass(NakedHelloWorld.class); - impl.initialize(new AssemblyModelContextImpl(new AssemblyFactoryImpl(), new SCDLAssemblyModelLoaderImpl(null), new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()))); - ComponentType type = impl.getComponentType(); - Assert.assertNotNull(type); - Assert.assertTrue(type.getProperties().isEmpty()); - Assert.assertTrue(type.getReferences().isEmpty()); - List<Service> services = type.getServices(); - Assert.assertEquals(1, services.size()); - Assert.assertTrue(services.get(0).getName().equals("NakedHelloWorld")); - } - - public void testNakedHelloWorldWithInterface() { - impl.setImplementationClass(NakedHelloWorldWithInterface.class); - impl.initialize(new AssemblyModelContextImpl(new AssemblyFactoryImpl(), new SCDLAssemblyModelLoaderImpl(null), new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()))); - ComponentType type = impl.getComponentType(); - Assert.assertNotNull(type); - Assert.assertTrue(type.getProperties().isEmpty()); - Assert.assertTrue(type.getReferences().isEmpty()); - List<Service> services = type.getServices(); - Assert.assertEquals(1, services.size()); - Assert.assertTrue(services.get(0).getName().equals("NakedHelloWorldWithInterface")); - } - - public void testHelloWorldWithSidefile() { - impl.setImplementationClass(HelloWorldImpl.class); - impl.initialize(new AssemblyModelContextImpl(new AssemblyFactoryImpl(), new SCDLAssemblyModelLoaderImpl(null), new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()))); - ComponentType type = impl.getComponentType(); - Assert.assertNotNull(type); - List<Property> props = type.getProperties(); - Assert.assertEquals(1, props.size()); - Assert.assertTrue(props.get(0).getName().equals("text")); - - Assert.assertTrue(type.getReferences().isEmpty()); - - List<Service> services = type.getServices(); - Assert.assertEquals(1, services.size()); - Assert.assertTrue(services.get(0).getName().equals("HelloWorldService")); - } - - public void testHelloWorldWithFieldProperties() { - impl.setImplementationClass(HelloWorldWithFieldProperties.class); - impl.initialize(new AssemblyModelContextImpl(new AssemblyFactoryImpl(), new SCDLAssemblyModelLoaderImpl(null), new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()))); - ComponentType type = impl.getComponentType(); - Assert.assertNotNull(type); - List<Property> props = type.getProperties(); - Assert.assertEquals(3, props.size()); - - Property prop = type.getProperty("text"); - Assert.assertNotNull(prop); - Assert.assertEquals("text", prop.getName()); - Assert.assertEquals(false, prop.isRequired()); - Assert.assertEquals(String.class, prop.getType()); - - prop = type.getProperty("text2"); - Assert.assertNotNull(prop); - Assert.assertEquals("text2", prop.getName()); - Assert.assertEquals(true, prop.isRequired()); - Assert.assertEquals(Integer.class, prop.getType()); - - prop = type.getProperty("foo"); - Assert.assertNotNull(prop); - Assert.assertEquals("foo", prop.getName()); - Assert.assertEquals(false, prop.isRequired()); - Assert.assertEquals(Integer.TYPE, prop.getType()); - } - - protected void setUp() throws Exception { - super.setUp(); - Thread.currentThread().setContextClassLoader(JavaImplementationTestCase.class.getClassLoader()); - } - - protected void tearDown() throws Exception { - Thread.currentThread().setContextClassLoader(null); - super.tearDown(); - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.componentType b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.componentType deleted file mode 100644 index 784d8bf728..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.componentType +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed 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.
- -->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" - xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <service name="HelloWorldService">
- <interface.java interface="org.apache.tuscany.container.java.assembly.mock.HelloWorldService" remoteable="true"/>
- </service>
- <property name="text" type="xsd:string"/>
-</componentType>
\ No newline at end of file diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.java deleted file mode 100644 index 74f4c658ce..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.mock; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorldImpl implements HelloWorldService { - - private String text; - - private int count; - - public String hello(String name) { - ++count; - return "Hello " + name; - } - - public int count() { - return count; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldService.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldService.java deleted file mode 100644 index a7d0fe7788..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldService.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.mock; - -/** - * @version $Rev$ $Date$ - */ -public interface HelloWorldService { - String hello(String name); - - public int count(); - -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldWithFieldProperties.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldWithFieldProperties.java deleted file mode 100644 index e015e611ae..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/HelloWorldWithFieldProperties.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.mock; - -import org.osoa.sca.annotations.Property; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorldWithFieldProperties { - @Property - private String text; - - @Property(required = true) - public Integer text2; - - @Property(name = "foo") - public int text3; - - @Property(name = "not exposed") - protected int field4; - - public String hello(String name) { - return "Hello " + name; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorld.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorld.java deleted file mode 100644 index 2f1ae5d17b..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorld.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.mock; - -/** - * @version $Rev$ $Date$ - */ -public class NakedHelloWorld { - public String hello(String name) { - return "Hello " + name; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorldWithInterface.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorldWithInterface.java deleted file mode 100644 index 9d5fe5e969..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/mock/NakedHelloWorldWithInterface.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.mock; - -import java.io.Serializable; - -/** - * @version $Rev$ $Date$ - */ -public class NakedHelloWorldWithInterface implements Serializable { - public String hello(String name) { - return "Hello " + name; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/JavaAssemblyLoaderTestCase.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/JavaAssemblyLoaderTestCase.java deleted file mode 100644 index d5cea8bea2..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/JavaAssemblyLoaderTestCase.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests; - -import java.util.ArrayList; -import java.util.List; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.common.resource.ResourceLoader; -import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl; -import org.apache.tuscany.container.java.assembly.tests.bigbank.account.services.accountdata.AccountDataService; -import org.apache.tuscany.container.java.loader.JavaSCDLModelLoader; -import org.apache.tuscany.model.assembly.AssemblyFactory; -import org.apache.tuscany.model.assembly.AssemblyModelContext; -import org.apache.tuscany.model.assembly.Component; -import org.apache.tuscany.model.assembly.EntryPoint; -import org.apache.tuscany.model.assembly.Module; -import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl; -import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl; -import org.apache.tuscany.model.assembly.loader.AssemblyModelLoader; -import org.apache.tuscany.model.scdl.loader.SCDLModelLoader; -import org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl; - -/** - */ -public class JavaAssemblyLoaderTestCase extends TestCase { - - /** - * - */ - public JavaAssemblyLoaderTestCase() { - super(); - } - - public void testLoader() { - - ResourceLoader resourceLoader=new ResourceLoaderImpl(Thread.currentThread().getContextClassLoader()); - JavaSCDLModelLoader javaLoader=new JavaSCDLModelLoader(); - List<SCDLModelLoader> scdlLoaders=new ArrayList<SCDLModelLoader>(); - scdlLoaders.add(javaLoader); - AssemblyModelLoader assemblyLoader=new SCDLAssemblyModelLoaderImpl(scdlLoaders); - AssemblyFactory assemblyFactory=new AssemblyFactoryImpl(); - AssemblyModelContext modelContext=new AssemblyModelContextImpl(assemblyFactory, assemblyLoader, resourceLoader); - - Module module = assemblyLoader.loadModule(getClass().getResource("sca.module").toString()); - module.initialize(modelContext); - Assert.assertTrue(module.getName().equals("tuscany.container.java.assembly.tests.bigbank.account")); - - Component component=module.getComponent("AccountServiceComponent"); - Assert.assertTrue(component!= null); - - EntryPoint entryPoint=module.getEntryPoint("AccountService"); - Assert.assertTrue(entryPoint!= null); - - Object value = component.getConfiguredProperty("currency").getValue(); - Assert.assertTrue(value.equals("EURO")); - - //ConfiguredService configuredService = component.getConfiguredReference("accountDataService").getTargetConfiguredServices().get(0); - //Assert.assertTrue(configuredService.getAggregatePart().getName().equals("AccountDataServiceComponent")); - - Class interfaceClass = component.getConfiguredReference("accountDataService").getReference().getServiceContract().getInterface(); - Assert.assertTrue(interfaceClass == AccountDataService.class); - - } - - protected void setUp() throws Exception { - super.setUp(); - - Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - } - -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountReport.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountReport.java deleted file mode 100644 index 1770c2b011..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountReport.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.account; - -import java.util.List; - -/** - * @model - */ - -public interface AccountReport { - - /** - * @model type="services.account.AccountSummary" - */ - - List getAccountSummaries(); -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.java deleted file mode 100644 index 1bb938655f..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.account; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface AccountService { - - public AccountReport getAccountReport(String customerID); -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.wsdl b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.wsdl deleted file mode 100644 index 921218c5b9..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountService.wsdl +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed 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 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://www.bigbank.com/AccountService/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.bigbank.com/AccountService/"
-
- name="AccountService">
-
- <wsdl:types>
- <xsd:schema targetNamespace="http://www.bigbank.com/AccountService/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:element name="customerID" type="xsd:string"/>
- <xsd:element name="getAccountReportResponse" type="tns:AccountReport"/>
-
- <xsd:complexType name="AccountReport">
- <xsd:sequence>
- <xsd:element name="accountSummary" type="tns:AccountSummary" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AccountSummary">
- <xsd:sequence>
- <xsd:element name="accountNumber" type="xsd:string"/>
- <xsd:element name="accountType" type="xsd:string"/>
- <xsd:element name="balance" type="xsd:float"/>
- </xsd:sequence>
- </xsd:complexType>
-
- </xsd:schema>
- </wsdl:types>
- <wsdl:message name="getAccountReportRequest">
- <wsdl:part element="tns:customerID" name="getAccountReportRequest"/>
- </wsdl:message>
- <wsdl:message name="getAccountReportResponse">
- <wsdl:part element="tns:getAccountReportResponse" name="getAccountReportResponse"/>
- </wsdl:message>
- <wsdl:portType name="AccountService">
- <wsdl:operation name="getAccountReport">
- <wsdl:input message="tns:getAccountReportRequest"/>
- <wsdl:output message="tns:getAccountReportResponse"/>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="AccountServiceSOAP" type="tns:AccountService">
- <soap:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getAccountReport">
- <soap:operation
- soapAction="http://www.bigbank.com/AccountService/getAccountReport"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="AccountService">
- <wsdl:port binding="tns:AccountServiceSOAP"
- name="AccountServiceSOAP">
- <soap:address location=""/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java deleted file mode 100644 index 9a5ddb0005..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountServiceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.account; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import org.apache.tuscany.container.java.assembly.tests.bigbank.account.services.accountdata.AccountDataService; -import org.apache.tuscany.container.java.assembly.tests.bigbank.account.services.stockquote.StockQuoteService; - -public class AccountServiceImpl implements AccountService { - - @Property - public String currency = "USD"; - - @Reference - public AccountDataService accountDataService; - @Reference - public StockQuoteService stockQuoteService; - - public AccountServiceImpl() { - } - - public AccountReport getAccountReport(String customerID) { - return null; - } - -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountSummary.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountSummary.java deleted file mode 100644 index 2b11e23425..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/account/AccountSummary.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.account; - -/** - * @model - */ - -public interface AccountSummary { - - /** - * @model - */ - String getAccountNumber(); - - void setAccountNumber(String accountNumber); - - /** - * @model - */ - String getAccountType(); - - void setAccountType(String accountType); - - /** - * @model - */ - float getBalance(); - - void setBalance(float balance); -} - diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java deleted file mode 100644 index 56f24ea4ac..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.accountdata; - -public interface AccountDataService { - - CheckingAccount getCheckingAccount(String customerID); - - SavingsAccount getSavingsAccount(String customerID); - - StockAccount getStockAccount(String customerID); -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java deleted file mode 100644 index a7a40f954d..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/AccountDataServiceImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.accountdata; - -public class AccountDataServiceImpl implements AccountDataService { - - public CheckingAccount getCheckingAccount(String customerID) { - - CheckingAccount checkingAccount = new CheckingAccount(); - checkingAccount.setAccountNumber(customerID + "_" + "CHA12345"); - checkingAccount.setBalance(1500.0f); - - return checkingAccount; - } - - public SavingsAccount getSavingsAccount(String customerID) { - - SavingsAccount savingsAccount = new SavingsAccount(); - savingsAccount.setAccountNumber(customerID + "_" + "SAA12345"); - savingsAccount.setBalance(1500.0f); - - return savingsAccount; - } - - public StockAccount getStockAccount(String customerID) { - - StockAccount stockAccount = new StockAccount(); - stockAccount.setAccountNumber(customerID + "_" + "STA12345"); - stockAccount.setSymbol("IBM"); - stockAccount.setQuantity(100); - - return stockAccount; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java deleted file mode 100644 index ff84e9968a..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/CheckingAccount.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.accountdata; - -public class CheckingAccount { - - private String accountNumber; - private float balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public float getBalance() { - return balance; - } - - public void setBalance(float balance) { - this.balance = balance; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java deleted file mode 100644 index b39d9051de..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.accountdata; - -public class SavingsAccount { - - private String accountNumber; - private float balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public float getBalance() { - return balance; - } - - public void setBalance(float balance) { - this.balance = balance; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/StockAccount.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/StockAccount.java deleted file mode 100644 index bce0821b25..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/accountdata/StockAccount.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.accountdata; - -public class StockAccount { - - private String accountNumber; - private String symbol; - private int quantity; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public int getQuantity() { - return quantity; - } - - public void setQuantity(int quantity) { - this.quantity = quantity; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } -} diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java deleted file mode 100644 index 78ece12b41..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.stockquote; - -public interface StockQuoteService { - - public float getQuote(String symbol); -} - -
\ No newline at end of file diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteServiceImpl.java b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteServiceImpl.java deleted file mode 100644 index fa180d0ceb..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed 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.container.java.assembly.tests.bigbank.account.services.stockquote; - -/* Dummy'd up StockQuoteService, override webservice for now */ - -public class StockQuoteServiceImpl implements StockQuoteService { - - public float getQuote(String symbol) { - // Just hardcode for now - return 83.00f; - } - -}
\ No newline at end of file diff --git a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl b/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl deleted file mode 100644 index 9678d9d6ea..0000000000 --- a/tags/java-stable-20060304/sca/container.java/src/test/java/org/apache/tuscany/container/java/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed 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://webservice.stockquote" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://webservice.stockquote" xmlns:intf="http://webservice.stockquote" xmlns:tns1="http://stockquote" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="">
- <!--WSDL created by Apache Axis version: 1.2.1
-Built on Jun 14, 2005 (09:15:57 EDT)-->
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://stockquote" xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="GetQuoteRequest">
- <sequence>
- <element name="symbol" nillable="true" type="xsd:string"/>
- </sequence>
- </complexType>
- <complexType name="GetQuoteResponse">
- <sequence>
- <element name="price" type="xsd:float"/>
- </sequence>
- </complexType>
- </schema>
- <schema elementFormDefault="qualified" targetNamespace="http://webservice.stockquote" xmlns="http://www.w3.org/2001/XMLSchema">
- <import namespace="http://stockquote"/>
- <element name="request" type="tns1:GetQuoteRequest"/>
- <element name="getQuoteReturn" type="tns1:GetQuoteResponse"/>
- </schema>
- </wsdl:types>
-
- <wsdl:message name="getQuoteResponse">
-
- <wsdl:part element="impl:getQuoteReturn" name="getQuoteReturn"/>
-
- </wsdl:message>
-
- <wsdl:message name="getQuoteRequest">
-
- <wsdl:part element="impl:request" name="request"/>
-
- </wsdl:message>
-
- <wsdl:portType name="StockQuoteWebService">
-
- <wsdl:operation name="getQuote" parameterOrder="request">
-
- <wsdl:input message="impl:getQuoteRequest" name="getQuoteRequest"/>
-
- <wsdl:output message="impl:getQuoteResponse" name="getQuoteResponse"/>
-
- </wsdl:operation>
-
- </wsdl:portType>
-
- <wsdl:binding name="StockQuoteWebServiceSoapBinding" type="impl:StockQuoteWebService">
-
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-
- <wsdl:operation name="getQuote">
-
- <wsdlsoap:operation soapAction=""/>
-
- <wsdl:input name="getQuoteRequest">
-
- <wsdlsoap:body use="literal"/>
-
- </wsdl:input>
-
- <wsdl:output name="getQuoteResponse">
-
- <wsdlsoap:body use="literal"/>
-
- </wsdl:output>
-
- </wsdl:operation>
-
- </wsdl:binding>
-
- <wsdl:service name="StockQuoteWebServiceService">
-
- <wsdl:port binding="impl:StockQuoteWebServiceSoapBinding" name="StockQuoteWebService">
-
- <wsdlsoap:address location="http://localhost:8123/StockQuoteWebService/services/StockQuoteWebService"/>
-
- </wsdl:port>
-
- </wsdl:service>
-
-</wsdl:definitions>
|