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/04/07 22:28:50 UTC

svn commit: r526480 [3/4] - in /incubator/tuscany/java/sca/modules: ./ assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/impl/ assembly/src/main/java/org/apache/tuscany/assembly/ assembly/src/main/java/org/apache/tuscany/assembly/impl/ assembl...

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,99 @@
+/*
+ * 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.interfacedef.java.introspection.impl;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.interfacedef.Interface;
+import org.apache.tuscany.interfacedef.InvalidOperationException;
+import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.interfacedef.java.introspection.impl.JavaInterfaceProcessorRegistryImpl;
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.EndsConversation;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ConversationalIntrospectionTestCase extends TestCase {
+    private AssemblyFactory factory = new DefaultAssemblyFactory();
+    private JavaInterfaceProcessorRegistryImpl registry = new JavaInterfaceProcessorRegistryImpl();
+
+    private Operation getOperation(Interface i, String name) {
+        for (Operation op : i.getOperations()) {
+            if (op.getName().equals(name)) {
+                return op;
+            }
+        }
+        return null;
+    }
+
+    public void testServiceContractConversationalInformationIntrospection() throws Exception {
+        Contract contract = factory.createComponentService();
+        registry.introspect(contract, Foo.class);
+        Interface i = contract.getInterface();
+        assertNotNull(i);
+        assertTrue(i.isConversational());
+        Operation.ConversationSequence seq = getOperation(i, "operation").getConversationSequence();
+        assertEquals(Operation.ConversationSequence.CONVERSATION_CONTINUE, seq);
+        seq = getOperation(i, "endOperation").getConversationSequence();
+        assertEquals(Operation.ConversationSequence.CONVERSATION_END, seq);
+    }
+
+    public void testBadServiceContract() throws Exception {
+        try {
+            Contract contract = factory.createComponentService();
+            registry.introspect(contract, BadFoo.class);
+            fail();
+        } catch (InvalidOperationException e) {
+            // expected
+        }
+    }
+
+    public void testNonConversationalInformationIntrospection() throws Exception {
+        Contract contract = factory.createComponentService();
+        registry.introspect(contract, NonConversationalFoo.class);
+        assertFalse(contract.getInterface().isConversational());
+        Operation.ConversationSequence seq = getOperation(contract.getInterface(), "operation")
+            .getConversationSequence();
+        assertEquals(Operation.ConversationSequence.NO_CONVERSATION, seq);
+    }
+
+    @Conversational
+    private interface Foo {
+        void operation();
+
+        @EndsConversation
+        void endOperation();
+    }
+
+    private interface BadFoo {
+        void operation();
+
+        @EndsConversation
+        void endOperation();
+    }
+
+    private interface NonConversationalFoo {
+        void operation();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,104 @@
+/*
+ * 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.interfacedef.java.introspection.impl;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import java.lang.reflect.Type;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.interfacedef.DataType;
+import org.apache.tuscany.interfacedef.InvalidInterfaceException;
+import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.interfacedef.java.JavaInterface;
+import org.easymock.EasyMock;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JavaInterfaceProcessorRegistryImplTestCase extends TestCase {
+    private JavaInterfaceProcessorRegistryImpl impl;
+    private AssemblyFactory factory = new DefaultAssemblyFactory();
+
+    public void testSimpleInterface() throws InvalidInterfaceException {
+        Contract contract = factory.createComponentService();
+        impl.introspect(contract, Simple.class);
+
+        JavaInterface intf = (JavaInterface)contract.getInterface();
+
+        assertEquals(Simple.class, intf.getJavaClass());
+        List<Operation> operations = intf.getOperations();
+        assertEquals(1, operations.size());
+        Operation baseInt = operations.get(0);
+        assertEquals("baseInt", baseInt.getName());
+
+        DataType<Type> returnType = baseInt.getOutputType();
+        assertEquals(Integer.TYPE, returnType.getPhysical());
+        assertEquals(Integer.TYPE, returnType.getLogical());
+
+        List<DataType> parameterTypes = baseInt.getInputType().getLogical();
+        assertEquals(1, parameterTypes.size());
+        DataType<Type> arg0 = parameterTypes.get(0);
+        assertEquals(Integer.TYPE, arg0.getPhysical());
+        assertEquals(Integer.TYPE, arg0.getLogical());
+
+        List<DataType> faultTypes = baseInt.getFaultTypes();
+        assertEquals(1, faultTypes.size());
+        DataType<Type> fault0 = faultTypes.get(0);
+        assertEquals(IllegalArgumentException.class, fault0.getPhysical());
+        assertEquals(IllegalArgumentException.class, fault0.getLogical());
+    }
+
+    public void testUnregister() throws Exception {
+        org.apache.tuscany.interfacedef.java.introspection.JavaInterfaceProcessor processor = createMock(org.apache.tuscany.interfacedef.java.introspection.JavaInterfaceProcessor.class);
+        processor.visitInterface(eq(Base.class), EasyMock.same((Class)null), isA(Contract.class));
+        expectLastCall().once();
+        replay(processor);
+        Contract contract = factory.createComponentService();
+        impl.registerProcessor(processor);
+        impl.introspect(contract, Base.class);
+        impl.unregisterProcessor(processor);
+        impl.introspect(contract, Base.class);
+        verify(processor);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        impl = new JavaInterfaceProcessorRegistryImpl();
+
+    }
+
+    private static interface Base {
+        int baseInt(int param) throws IllegalArgumentException;
+    }
+
+    private static interface Simple extends Base {
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,95 @@
+/*
+ * 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.interfacedef.java.xml;
+
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.ComponentType;
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.ConstrainingType;
+import org.apache.tuscany.assembly.util.CompositeUtil;
+import org.apache.tuscany.assembly.util.PrintUtil;
+import org.apache.tuscany.assembly.xml.impl.ComponentTypeProcessor;
+import org.apache.tuscany.assembly.xml.impl.CompositeProcessor;
+import org.apache.tuscany.assembly.xml.impl.ConstrainingTypeProcessor;
+import org.apache.tuscany.interfacedef.java.xml.JavaInterfaceProcessor;
+import org.apache.tuscany.services.spi.contribution.DefaultStAXArtifactProcessorRegistry;
+
+/**
+ * Test the usability of the assembly model API when loading SCDL
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ReadTestCase extends TestCase {
+
+    XMLInputFactory inputFactory;
+    DefaultStAXArtifactProcessorRegistry registry;
+
+    public void setUp() throws Exception {
+        inputFactory = XMLInputFactory.newInstance();
+        registry = new DefaultStAXArtifactProcessorRegistry();
+
+        JavaInterfaceProcessor javaProcessor = new JavaInterfaceProcessor();
+        registry.addArtifactProcessor(javaProcessor);
+    }
+
+    public void tearDown() throws Exception {
+        inputFactory = null;
+        registry = null;
+    }
+
+    public void testReadComponentType() throws Exception {
+        ComponentTypeProcessor componentTypeReader = new ComponentTypeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ComponentType componentType = componentTypeReader.read(reader);
+        assertNotNull(componentType);
+
+        new PrintUtil(System.out).print(componentType);
+    }
+
+    public void testReadConstrainingType() throws Exception {
+        ConstrainingTypeProcessor constrainingTypeProcessor = new ConstrainingTypeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("CalculatorComponent.constrainingType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ConstrainingType constrainingType = constrainingTypeProcessor.read(reader);
+        assertNotNull(constrainingType);
+
+        new PrintUtil(System.out).print(constrainingType);
+    }
+
+    public void testReadComposite() throws Exception {
+        CompositeProcessor compositeProcessor = new CompositeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("Calculator.composite");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        Composite composite = compositeProcessor.read(reader);
+        assertNotNull(composite);
+
+        new CompositeUtil(composite).configure(null);
+
+        new PrintUtil(System.out).print(composite);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite Sat Apr  7 13:28:42 2007
@@ -0,0 +1,53 @@
+<?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:calc="http://sample.calculator"
+	targetNamespace="http://calc"
+	name="calc:Calculator">
+
+    <service name="CalculatorService" promote="CalculatorServiceComponent">
+        <interface.java interface="calculator.CalculatorService"/>
+    </service>
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent"/>
+        <reference name="subtractService" target="SubtractServiceComponent"/>
+        <reference name="multiplyService" target="MultiplyServiceComponent"/>
+        <reference name="divideService" target="DivideServiceComponent"/>
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorComponent.constrainingType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorComponent.constrainingType?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorComponent.constrainingType (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorComponent.constrainingType Sat Apr  7 13:28:42 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<constrainingType xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	xmlns:calc="http://calc"
+    targetNamespace="http://calc"
+	name="CalculatorComponent">
+
+  <service name="CalculatorService">
+        <interface.java class="calculator.CalculatorService" />
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</constrainingType>              
+       
\ No newline at end of file

Added: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType (added)
+++ incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType Sat Apr  7 13:28:42 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+  <service name="CalculatorService">
+        <interface.java class="calculator.CalculatorService" />
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</componentType>              
+       
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java-xml/src/test/resources/org/apache/tuscany/interfacedef/java/xml/CalculatorImpl.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.interfacedef.java;
+
+/**
+ * Factory for the Java model
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface JavaFactory {
+
+    /**
+     * Creates a new Java interface.
+     * 
+     * @return
+     */
+    JavaInterface createJavaInterface();
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,58 @@
+/*
+ * 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.interfacedef.java;
+
+import org.apache.tuscany.interfacedef.Interface;
+
+/**
+ * Represents a Java interface.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface JavaInterface extends Interface {
+
+    /**
+     * Returns the name of the Java interface class.
+     * 
+     * @return the name of the Java interface class
+     */
+    String getName();
+
+    /**
+     * Sets the name of the Java interface class.
+     * 
+     * @param className the name of the Java interface class
+     */
+    void setName(String className);
+
+    /**
+     * Returns the Java interface class.
+     * 
+     * @return the Java interface class
+     */
+    Class<?> getJavaClass();
+
+    /**
+     * Sets the Java interface class.
+     * 
+     * @param javaClass the Java interface class
+     */
+    void setJavaClass(Class<?> javaClass);
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/JavaInterface.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.interfacedef.java.impl;
+
+import org.apache.tuscany.interfacedef.java.JavaFactory;
+import org.apache.tuscany.interfacedef.java.JavaInterface;
+
+/**
+ * A factory for the Java model.
+ */
+public class DefaultJavaFactory implements JavaFactory {
+
+    public DefaultJavaFactory() {
+    }
+
+    public JavaInterface createJavaInterface() {
+        return new JavaInterfaceImpl();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/DefaultJavaFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java (added)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,75 @@
+/*
+ * 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.interfacedef.java.impl;
+
+import org.apache.tuscany.interfacedef.impl.InterfaceImpl;
+import org.apache.tuscany.interfacedef.java.JavaInterface;
+
+/**
+ * Represents a Java interface.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {
+
+    private String className;
+    private Class<?> javaClass;
+
+    public String getName() {
+        if (isUnresolved()) {
+            return className;
+        } else {
+            return javaClass.getName();
+        }
+    }
+
+    public void setName(String className) {
+        if (!isUnresolved()) {
+            throw new IllegalStateException();
+        }
+        this.className = className;
+    }
+
+    public Class<?> getJavaClass() {
+        return javaClass;
+    }
+
+    public void setJavaClass(Class<?> javaClass) {
+        this.javaClass = javaClass;
+    }
+    
+    public String toString() {
+        return getName();
+    }
+
+    @Override
+    public int hashCode() {
+        return String.valueOf(className).hashCode();
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this)
+            return true;
+        else if (obj instanceof JavaInterface && className.equals(((JavaInterface)obj).getName()))
+             return true;
+        else
+            return false;
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,31 @@
+/*
+ * 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.interfacedef.wsdl.xml;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.assembly.xml.Constants;
+
+public interface WSDLConstants {
+
+    String INTERFACE_WSDL = "interface.wsdl";
+    QName INTERFACE_WSDL_QNAME = new QName(Constants.SCA10_NS, "interface.wsdl");
+    String INTERFACE = "interface";
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLConstants.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,93 @@
+/*
+ * 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.interfacedef.wsdl.xml;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
+import org.apache.tuscany.services.spi.contribution.ArtifactResolver;
+import org.apache.tuscany.services.spi.contribution.ContributionReadException;
+import org.apache.tuscany.services.spi.contribution.ContributionResolveException;
+import org.apache.tuscany.services.spi.contribution.ContributionWireException;
+import org.apache.tuscany.services.spi.contribution.ContributionWriteException;
+import org.apache.tuscany.services.spi.contribution.StAXArtifactProcessor;
+
+public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterface>, WSDLConstants {
+
+    private WSDLFactory wsdlFactory;
+
+    public WSDLInterfaceProcessor(WSDLFactory wsdlFactory) {
+        this.wsdlFactory = wsdlFactory;
+    }
+    
+    public WSDLInterfaceProcessor() {
+        this(new DefaultWSDLFactory());
+    }
+
+    public WSDLInterface read(XMLStreamReader reader) throws ContributionReadException {
+        
+        try {
+    
+            // Read an <interface.java>
+            WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface();
+            wsdlInterface.setUnresolved(true);
+            // TODO handle qname
+            wsdlInterface.setName(new QName("", reader.getAttributeValue(null, INTERFACE)));
+    
+            // Skip to end element
+            while (reader.hasNext()) {
+                if (reader.next() == END_ELEMENT && INTERFACE_WSDL_QNAME.equals(reader.getName())) {
+                    break;
+                }
+            }
+            return wsdlInterface;
+            
+        } catch (XMLStreamException e) {
+            throw new ContributionReadException(e);
+        }
+    }
+    
+    public void write(WSDLInterface model, XMLStreamWriter outputSource) throws ContributionWriteException {
+        // TODO Auto-generated method stub
+    }
+    
+    public void resolve(WSDLInterface model, ArtifactResolver resolver) throws ContributionResolveException {
+        // TODO Auto-generated method stub
+    }
+    
+    public void wire(WSDLInterface model) throws ContributionWireException {
+        // TODO Auto-generated method stub
+    }
+    
+    public QName getArtifactType() {
+        return WSDLConstants.INTERFACE_WSDL_QNAME;
+    }
+    
+    public Class<WSDLInterface> getModelType() {
+        return WSDLInterface.class;
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,95 @@
+/*
+ * 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.interfacedef.wsdl.xml;
+
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.ComponentType;
+import org.apache.tuscany.assembly.Composite;
+import org.apache.tuscany.assembly.ConstrainingType;
+import org.apache.tuscany.assembly.util.CompositeUtil;
+import org.apache.tuscany.assembly.util.PrintUtil;
+import org.apache.tuscany.assembly.xml.impl.ComponentTypeProcessor;
+import org.apache.tuscany.assembly.xml.impl.CompositeProcessor;
+import org.apache.tuscany.assembly.xml.impl.ConstrainingTypeProcessor;
+import org.apache.tuscany.interfacedef.wsdl.xml.WSDLInterfaceProcessor;
+import org.apache.tuscany.services.spi.contribution.DefaultStAXArtifactProcessorRegistry;
+
+/**
+ * Test the usability of the assembly model API when loading SCDL
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ReadTestCase extends TestCase {
+
+    XMLInputFactory inputFactory;
+    DefaultStAXArtifactProcessorRegistry registry;
+
+    public void setUp() throws Exception {
+        inputFactory = XMLInputFactory.newInstance();
+        registry = new DefaultStAXArtifactProcessorRegistry();
+
+        WSDLInterfaceProcessor wsdlProcessor = new WSDLInterfaceProcessor();
+        registry.addArtifactProcessor(wsdlProcessor);
+    }
+
+    public void tearDown() throws Exception {
+        inputFactory = null;
+        registry = null;
+    }
+
+    public void testReadComponentType() throws Exception {
+        ComponentTypeProcessor componentTypeProcessor = new ComponentTypeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ComponentType componentType = componentTypeProcessor.read(reader);
+        assertNotNull(componentType);
+
+        new PrintUtil(System.out).print(componentType);
+    }
+
+    public void testReadConstrainingType() throws Exception {
+        ConstrainingTypeProcessor constrainingTypeProcessor = new ConstrainingTypeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("CalculatorComponent.constrainingType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ConstrainingType constrainingType = constrainingTypeProcessor.read(reader);
+        assertNotNull(constrainingType);
+
+        new PrintUtil(System.out).print(constrainingType);
+    }
+
+    public void testReadComposite() throws Exception {
+        CompositeProcessor compositeProcessor = new CompositeProcessor(registry);
+        InputStream is = getClass().getResourceAsStream("Calculator.composite");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        Composite composite = compositeProcessor.read(reader);
+        assertNotNull(composite);
+
+        new CompositeUtil(composite).configure(null);
+
+        new PrintUtil(System.out).print(composite);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite Sat Apr  7 13:28:42 2007
@@ -0,0 +1,53 @@
+<?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:calc="http://sample.calculator"
+	targetNamespace="http://calc"
+	name="calc:Calculator">
+
+    <service name="CalculatorService" promote="CalculatorServiceComponent">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
+    </service>
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent"/>
+        <reference name="subtractService" target="SubtractServiceComponent"/>
+        <reference name="multiplyService" target="MultiplyServiceComponent"/>
+        <reference name="divideService" target="DivideServiceComponent"/>
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorComponent.constrainingType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorComponent.constrainingType?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorComponent.constrainingType (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorComponent.constrainingType Sat Apr  7 13:28:42 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<constrainingType xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	xmlns:calc="http://calc"
+    targetNamespace="http://calc"
+	name="CalculatorComponent">
+
+  <service name="CalculatorService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</constrainingType>              
+       
\ No newline at end of file

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType Sat Apr  7 13:28:42 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+  <service name="CalculatorService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</componentType>              
+       
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/CalculatorImpl.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,26 @@
+<?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://www.example.org"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  name="example">
+
+    <wsdl:portType name="HelloWorld">
+    </wsdl:portType>
+</wsdl:definitions>

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/example.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl"
+    xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd"
+    xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+    <types>
+        <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+            <element name="getLastTradePrice1">
+                <complexType>
+                    <sequence>
+                        <element name="tickerSymbol" type="string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getLastTradePriceResponse">
+                <complexType>
+                    <sequence>
+                        <element name="price" type="float" />
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </types>
+
+    <message name="GetLastTradePriceInput">
+        <part name="body" element="xsd1:getLastTradePrice" />
+    </message>
+
+    <message name="GetLastTradePriceOutput">
+        <part name="body" element="xsd1:getLastTradePriceResponse" />
+    </message>
+
+    <portType name="StockQuotePortType">
+        <operation name="getLastTradePrice">
+            <input message="tns:GetLastTradePriceInput" />
+            <output message="tns:GetLastTradePriceOutput" />
+        </operation>
+    </portType>
+
+</definitions>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/invalid-stockquote.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd Sat Apr  7 13:28:42 2007
@@ -0,0 +1,118 @@
+<schema targetNamespace="http://www.example.com/IPO"
+	xmlns="http://www.w3.org/2001/XMLSchema"
+	xmlns:ipo="http://www.example.com/IPO">
+
+	<annotation>
+		<documentation xml:lang="en">
+			International Purchase order schema for Example.com
+			Copyright 2000 Example.com. All rights reserved.
+		</documentation>
+	</annotation>
+
+
+	<element name="purchaseOrder" type="ipo:PurchaseOrderType" />
+
+	<element name="comment" type="string" />
+
+	<complexType name="PurchaseOrderType">
+		<sequence>
+			<element name="shipTo" type="ipo:Address" />
+			<element name="billTo" type="ipo:Address" />
+			<element ref="ipo:comment" minOccurs="0" />
+			<element name="items" type="ipo:Items" />
+		</sequence>
+		<attribute name="orderDate" type="date" />
+	</complexType>
+
+	<complexType name="Items">
+		<sequence>
+			<element name="item" minOccurs="0" maxOccurs="unbounded">
+				<complexType>
+					<sequence>
+						<element name="productName" type="string" />
+						<element name="quantity">
+							<simpleType>
+								<restriction base="positiveInteger">
+									<maxExclusive value="100" />
+								</restriction>
+							</simpleType>
+						</element>
+						<element name="USPrice" type="decimal" />
+						<element ref="ipo:comment" minOccurs="0" />
+						<element name="shipDate" type="date"
+							minOccurs="0" />
+					</sequence>
+					<attribute name="partNum" type="ipo:SKU"
+						use="required" />
+				</complexType>
+			</element>
+		</sequence>
+	</complexType>
+
+	<simpleType name="SKU">
+		<restriction base="string">
+			<pattern value="\d{3}-[A-Z]{2}" />
+		</restriction>
+	</simpleType>
+
+	<complexType name="Address">
+		<sequence>
+			<element name="name" type="string" />
+			<element name="street" type="string" />
+			<element name="city" type="string" />
+		</sequence>
+	</complexType>
+
+	<complexType name="USAddress">
+		<complexContent>
+			<extension base="ipo:Address">
+				<sequence>
+					<element name="state" type="ipo:USState" />
+					<element name="zip" type="positiveInteger" />
+				</sequence>
+			</extension>
+		</complexContent>
+	</complexType>
+
+	<complexType name="UKAddress">
+		<complexContent>
+			<extension base="ipo:Address">
+				<sequence>
+					<element name="postcode" type="ipo:UKPostcode" />
+				</sequence>
+				<attribute name="exportCode" type="positiveInteger"
+					fixed="1" />
+			</extension>
+		</complexContent>
+	</complexType>
+
+	<!-- other Address derivations for more countries -->
+
+	<simpleType name="USState">
+		<restriction base="string">
+			<enumeration value="AK" />
+			<enumeration value="AL" />
+			<enumeration value="AR" />
+			<enumeration value="CA" />
+			<enumeration value="PA" />
+			<!-- and so on ... -->
+		</restriction>
+	</simpleType>
+
+	<simpleType name="Postcode">
+		<restriction base="string">
+			<length value="7" fixed="true" />
+		</restriction>
+	</simpleType>
+
+
+	<simpleType name="UKPostcode">
+		<restriction base="ipo:Postcode">
+			<pattern value="[A-Z]{2}\d\s\d[A-Z]{2}" />
+		</restriction>
+	</simpleType>
+
+
+
+</schema>
+

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/ipo.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl"
+    xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd"
+    xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+    <types>
+        <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+            <element name="getLastTradePrice">
+                <complexType>
+                    <sequence>
+                        <element name="tickerSymbol" type="string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getLastTradePriceResponse">
+                <complexType>
+                    <sequence>
+                        <element name="price" type="float" />
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </types>
+
+    <message name="GetLastTradePriceInput">
+        <part name="body" element="xsd1:getLastTradePrice" />
+    </message>
+
+    <message name="GetLastTradePriceOutput">
+        <part name="body" element="xsd1:getLastTradePriceResponse" />
+    </message>
+
+    <portType name="StockQuotePortType">
+        <operation name="getLastTradePrice">
+            <input message="tns:GetLastTradePriceInput" />
+            <output message="tns:GetLastTradePriceOutput" />
+        </operation>
+    </portType>
+
+</definitions>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/stockquote.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,45 @@
+<?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:import location="test2.wsdl" namespace="http://helloworld"></wsdl:import>
+
+    <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/sample-helloworldws-1.0-SNAPSHOT/services/HelloWorldWebService" />
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd Sat Apr  7 13:28:42 2007
@@ -0,0 +1,15 @@
+<schema targetNamespace="http://www.example.com/Customer" xmlns="http://www.w3.org/2001/XMLSchema"
+    xmlns:ipo="http://www.example.com/IPO" xmlns:tns="http://www.example.com/Customer">
+    <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd" />
+
+    <complexType name="Customer">
+        <sequence>
+            <element name="customerID" type="string"></element>
+            <element name="name" type="string"></element>
+            <element name="order" type="ipo:PurchaseOrderType" />
+        </sequence>
+    </complexType>
+    <element name="customer" type="tns:Customer"></element>
+
+</schema>
+

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test1.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,63 @@
+<?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">
+
+            <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd" />
+
+            <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:definitions>

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/test2.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl Sat Apr  7 13:28:42 2007
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl"
+    xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+    <types>
+        <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+            <element name="getLastTradePrice">
+                <complexType>
+                    <sequence>
+                        <element name="tickerSymbol" type="string" />
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getLastTradePriceResponse">
+                <complexType>
+                    <sequence>
+                        <element name="price" type="float" />
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </types>
+
+    <message name="GetLastTradePriceInput1">
+        <part name="body" element="xsd1:getLastTradePrice" />
+    </message>
+
+    <message name="GetLastTradePriceOutput1">
+        <part name="body" element="xsd1:getLastTradePriceResponse" />
+    </message>
+
+    <message name="GetLastTradePriceInput2">
+        <part name="body" element="xsd1:getLastTradePrice" />
+        <part name="other" type="xsd:string"/>
+    </message>
+
+    <message name="GetLastTradePriceOutput2">
+        <part name="body" element="xsd1:getLastTradePriceResponse" />
+    </message>
+    
+    <portType name="StockQuotePortType">
+        <operation name="getLastTradePrice">
+            <input message="tns:GetLastTradePriceInput1" />
+            <output message="tns:GetLastTradePriceOutput1" />
+        </operation>
+        <operation name="getLastTradePrice1">
+            <input message="tns:GetLastTradePriceInput1" />
+            <output message="tns:GetLastTradePriceOutput1" />
+        </operation>
+        <operation name="getLastTradePrice2">
+            <input message="tns:GetLastTradePriceInput2" />
+            <output message="tns:GetLastTradePriceOutput2" />
+        </operation>
+    </portType>
+
+</definitions>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/resources/org/apache/tuscany/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.interfacedef.wsdl;
+
+/**
+ * Factory for the WSDL model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface WSDLFactory {
+
+    /**
+     * Creates a new WSDL interface.
+     * 
+     * @return a new WSDL interface
+     */
+    WSDLInterface createWSDLInterface();
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java Sat Apr  7 13:28:42 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.interfacedef.wsdl;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.interfacedef.Interface;
+
+
+/**
+ * Represents a WSDL interface.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface WSDLInterface extends Interface {
+
+    /**
+     * Returns the name of the WSDL interface.
+     * 
+     * @return the name of the WSDL interface
+     */
+    QName getName();
+
+    /**
+     * Sets the name of the WSDL interface.
+     * 
+     * @param className the name of the WSDL interface
+     */
+    void setName(QName interfaceName);
+
+    /**
+     * Returns the WSDL interface portType.
+     * 
+     * @return the WSDL interface portType
+     */
+    PortType getPortType();
+
+    /**
+     * Sets the WSDL interface portType
+     * 
+     * @param portType the WSDL interface portType
+     */
+    void setPortType(PortType portType);
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/WSDLInterface.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.java?view=auto&rev=526480
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.java (added)
+++ incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.java Sat Apr  7 13:28:42 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.interfacedef.wsdl.impl;
+
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.WSDLInterface;
+
+/**
+ * A factory for the WSDL model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class DefaultWSDLFactory implements WSDLFactory {
+
+    public WSDLInterface createWSDLInterface() {
+        return new WSDLInterfaceImpl();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/DefaultWSDLFactory.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