You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/04/25 13:58:40 UTC

svn commit: r768518 [2/2] - in /tuscany/java/sca: features/core/ modules/ modules/binding-ws-axis2/ modules/binding-ws-jaxws/ modules/binding-ws-wsdlgen/ modules/binding-ws-xml/ modules/implementation-bpel-ode/ modules/implementation-bpel/ modules/inte...

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLPolicyAnnotatedInterfaceIntrospectorTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,86 @@
+/*
+ * 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.sca.interfacedef.wsdl.introspect;
+
+import java.net.URI;
+import java.net.URL;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.interfacedef.ConversationSequence;
+import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.AbstractWSDLTestCase;
+import org.apache.tuscany.sca.policy.Intent;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test case for InterfaceWSDLIntrospectorImpl.
+ *
+ * @version $Rev: 665985 $ $Date: 2008-06-10 06:35:33 +0100 (Tue, 10 Jun 2008) $
+ */
+public class WSDLPolicyAnnotatedInterfaceIntrospectorTestCase extends AbstractWSDLTestCase {
+    private static final QName PORTTYPE_NAME = new QName("http://example.com/stockquote.wsdl", "StockQuotePortType");
+    private static final QName INTENT = new QName("http://example.com/stockquote.wsdl", "PolicyIntent");
+
+    private PortType portType;
+    private WSDLDefinition definition;
+
+    @Before
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+
+        URL url = getClass().getResource("/policy/stockquote_policy.wsdl");
+        definition = (WSDLDefinition)documentProcessor.read(null, new URI("stockquote.wsdl"), url);
+        resolver.addModel(definition);
+        definition = resolver.resolveModel(WSDLDefinition.class, definition);
+        portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
+    }
+
+    @Test
+    public final void testIntrospectPortType() throws InvalidInterfaceException {
+        WSDLInterface contract = wsdlFactory.createWSDLInterface(portType, definition, resolver);
+        Assert.assertEquals(contract.getName().getLocalPart(), "StockQuotePortType");
+        Assert.assertTrue(contract.isConversational());
+        
+        boolean foundIntent = false;
+        
+        for(Intent intent : contract.getRequiredIntents()) {
+            if(INTENT.equals(intent.getName())) {
+                foundIntent = true;
+            }
+        }
+        
+        Assert.assertTrue(foundIntent);
+        
+        for(Operation operation : contract.getOperations()) {
+            if(operation.getName().equals("cancel")) {
+                Assert.assertEquals(operation.getConversationSequence(), ConversationSequence.CONVERSATION_END);
+            }
+        }
+        
+    }
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.interfacedef.wsdl.introspect;
+
+import java.net.URI;
+import java.net.URL;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLOperation;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.AbstractWSDLTestCase;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test case for WSDLOperation.
+ *
+ * @version $Rev: 660340 $ $Date: 2008-05-27 01:08:32 +0100 (Tue, 27 May 2008) $
+ */
+public class WrapperStyleOperationTestCase extends AbstractWSDLTestCase {
+    private static final QName PORTTYPE_NAME = new QName("http://example.com/stockquote.wsdl", "StockQuotePortType");
+
+    @Test
+    public final void testWrappedOperation() throws Exception {
+        URL url = getClass().getResource("../xml/stockquote.wsdl");
+        WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, new URI("stockquote.wsdl"), url);
+        resolver.addModel(definition);
+        definition = resolver.resolveModel(WSDLDefinition.class, definition);
+        PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
+        WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver);
+        WSDLOperation op = (WSDLOperation) wi.getOperations().get(0);
+        Assert.assertTrue(op.isWrapperStyle());
+        Assert.assertEquals(1, op.getWrapper().getInputChildElements().size());
+        Assert.assertEquals(1, op.getWrapper().getOutputChildElements().size());
+    }
+
+    @Test
+    public final void testUnwrappedOperation() throws Exception {
+        URL url = getClass().getResource("../xml/unwrapped-stockquote.wsdl");
+        WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, new URI("unwrapped-stockquote.wsdl"), url);
+        resolver.addModel(definition);
+        definition = resolver.resolveModel(WSDLDefinition.class, definition);
+        PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
+        WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver);
+        WSDLOperation op = (WSDLOperation) wi.getOperations().get(1);
+        Assert.assertFalse(op.isWrapperStyle());
+        op = (WSDLOperation) wi.getOperations().get(2);
+        Assert.assertFalse(op.isWrapperStyle());
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.ContributionFactory;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.xsd.XSDFactory;
+import org.junit.Before;
+
+/**
+ * Test case for WSDLOperation.
+ *
+ * @version $Rev: 723274 $ $Date: 2008-12-04 10:14:09 +0000 (Thu, 04 Dec 2008) $
+ */
+public abstract class AbstractWSDLTestCase {
+    protected URLArtifactProcessor<Object> documentProcessor;
+    protected ModelResolver resolver;
+    protected WSDLFactory wsdlFactory;
+    protected XSDFactory xsdFactory;
+
+    @Before
+    public void setUp() throws Exception {
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+        wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
+        xsdFactory = modelFactories.getFactory(XSDFactory.class);
+        
+        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
+        Contribution contribution = contributionFactory.createContribution();
+        ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
+        resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+        contribution.setModelResolver(resolver);
+        
+        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,91 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.assembly.ComponentType;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test reading WSDL interfaces.
+ * 
+ * @version $Rev: 723270 $ $Date: 2008-12-04 09:48:12 +0000 (Thu, 04 Dec 2008) $
+ */
+public class ReadTestCase {
+
+    private XMLInputFactory inputFactory;
+    private StAXArtifactProcessor<Object> staxProcessor;
+    private CompositeBuilder compositeBuilder;
+
+    @Before
+    public void setUp() throws Exception {
+        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        inputFactory = XMLInputFactory.newInstance();
+        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
+        
+        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+        compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");
+    }
+
+    @Test
+    public void testReadComponentType() throws Exception {
+        InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ComponentType componentType = (ComponentType)staxProcessor.read(reader);
+        assertNotNull(componentType);
+    }
+
+    @Test
+    public void testReadConstrainingType() throws Exception {
+        InputStream is = getClass().getResourceAsStream("CalculatorComponent.constrainingType");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        ConstrainingType constrainingType = (ConstrainingType)staxProcessor.read(reader);
+        assertNotNull(constrainingType);
+    }
+
+    @Test
+    public void testReadComposite() throws Exception {
+        InputStream is = getClass().getResourceAsStream("Calculator.composite");
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+        Composite composite = (Composite)staxProcessor.read(reader);
+        assertNotNull(composite);
+
+        compositeBuilder.build(composite, null, null);
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,67 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Import;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @version $Rev: 723274 $ $Date: 2008-12-04 10:14:09 +0000 (Thu, 04 Dec 2008) $
+ */
+public class WSDLDocumentProcessorTestCase extends AbstractWSDLTestCase {
+
+    @Test
+    public void testWSDL() throws Exception {
+       
+        URL url = getClass().getResource("/wsdl/helloworld-service.wsdl");
+        WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, URI.create("wsdl/helloworld-service.wsdl"), url);
+        
+        Assert.assertNull(definition.getDefinition());
+        Assert.assertEquals("http://helloworld", definition.getNamespace());
+        URL url1 = getClass().getResource("/wsdl/helloworld-interface.wsdl");
+        WSDLDefinition definition1 = (WSDLDefinition)documentProcessor.read(null, URI.create("wsdl/helloworld-interface.wsdl"), url1);
+        Assert.assertNull(definition1.getDefinition());
+        Assert.assertEquals("http://helloworld", definition1.getNamespace());
+
+        resolver.addModel(definition);
+        resolver.addModel(definition1);
+        resolver.resolveModel(WSDLDefinition.class, definition);
+        resolver.resolveModel(WSDLDefinition.class, definition1);
+        WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, definition);
+        List imports = (List)definition.getDefinition().getImports().get("http://helloworld");
+        Assert.assertNotNull(imports);
+        Assert.assertNotNull(((Import)imports.get(0)).getDefinition());
+        Assert.assertNotNull(resolved.getDefinition().getPortType(new QName("http://helloworld", "HelloWorld")));
+        Assert.assertNotNull(resolved.getDefinition().getService(new QName("http://helloworld", "HelloWorldService")));
+        
+        assertNotNull(resolved.getXmlSchemaType(new QName("http://greeting", "Name")));
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,111 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.net.URI;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test reading WSDL interfaces.
+ * 
+ * @version $Rev: 723270 $ $Date: 2008-12-04 09:48:12 +0000 (Thu, 04 Dec 2008) $
+ */
+public class WSDLTestCase {
+
+    private ExtensibleURLArtifactProcessor documentProcessor;
+    private WSDLModelResolver wsdlResolver;
+
+    @Before
+    public void setUp() throws Exception {
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
+
+        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+        wsdlResolver = new WSDLModelResolver(null, modelFactories);
+    }
+
+    @Test
+    public void testReadWSDLDocument() throws Exception {
+        URL url = getClass().getResource("example.wsdl");
+        WSDLDefinition definition = documentProcessor.read(null, new URI("example.wsdl"), url, WSDLDefinition.class);
+        assertNotNull(definition);
+        assertNull(definition.getDefinition());
+        assertEquals(definition.getNamespace(), "http://www.example.org");
+    }
+
+    @Test
+    public void testReadWSDLImports() throws Exception {
+        QName aBinding = new QName("http://helloworld", "HelloWorldSoapBinding");
+        QName aPortType = new QName("http://helloworld", "HelloWorld");
+
+        URL url = getClass().getResource("test1.wsdl");
+        WSDLDefinition test1Defn = documentProcessor.read(null, new URI("test1.wsdl"), url, WSDLDefinition.class);
+        assertNotNull(test1Defn);
+        wsdlResolver.addModel(test1Defn);
+        test1Defn = wsdlResolver.resolveModel(WSDLDefinition.class, test1Defn);
+        //binding is a part of test1.wsdl
+        assertNotNull(test1Defn.getDefinition().getBinding(aBinding));
+        //porttype is part of test2.wsdl
+        assertNotNull(test1Defn.getDefinition().getPortType(aPortType));
+    }
+
+    @Test
+    public void testReadSameNamespaceWSDLDocument() throws Exception {
+        QName aBinding = new QName("http://helloworld", "HelloWorldSoapBinding");
+        QName aPortType = new QName("http://helloworld", "HelloWorld");
+
+        URL url = getClass().getResource("test2.wsdl");
+        WSDLDefinition test2Defn = documentProcessor.read(null, new URI("test2.wsdl"), url, WSDLDefinition.class);
+        assertNotNull(test2Defn);
+        wsdlResolver.addModel(test2Defn);
+        test2Defn = wsdlResolver.resolveModel(WSDLDefinition.class, test2Defn);
+
+        //bindings are a part of test1.wsdl so should not be found
+        assertNull(test2Defn.getDefinition().getBinding(aBinding));
+        assertNotNull(test2Defn.getDefinition().getPortType(aPortType));
+
+        url = getClass().getResource("test1.wsdl");
+        WSDLDefinition test1Defn = documentProcessor.read(null, new URI("test1.wsdl"), url, WSDLDefinition.class);
+        assertNotNull(test1Defn);
+        wsdlResolver.addModel(test1Defn);
+
+        test1Defn = wsdlResolver.resolveModel(WSDLDefinition.class, test1Defn);
+
+        assertNotNull(test1Defn.getDefinition().getPortType(aPortType));
+        assertNotNull(test1Defn.getDefinition().getBinding(aBinding));
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,88 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+
+import org.apache.tuscany.sca.assembly.ComponentType;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test reading/write WSDL interfaces.
+ * 
+ * @version $Rev: 723270 $ $Date: 2008-12-04 09:48:12 +0000 (Thu, 04 Dec 2008) $
+ */
+public class WriteTestCase {
+
+    private XMLInputFactory inputFactory;
+    private XMLOutputFactory outputFactory;
+    private StAXArtifactProcessor<Object> staxProcessor;
+
+    @Before
+    public void setUp() throws Exception {
+        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        inputFactory = XMLInputFactory.newInstance();
+        outputFactory = XMLOutputFactory.newInstance();
+        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
+    }
+
+    @Test
+    public void testReadWriteComponentType() throws Exception {
+        InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType");
+        ComponentType componentType = (ComponentType)staxProcessor.read(inputFactory.createXMLStreamReader(is));
+        assertNotNull(componentType);
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        staxProcessor.write(componentType, outputFactory.createXMLStreamWriter(bos));
+    }
+
+    @Test
+    public void testReadWriteConstrainingType() throws Exception {
+        InputStream is = getClass().getResourceAsStream("CalculatorComponent.constrainingType");
+        ConstrainingType constrainingType = (ConstrainingType)staxProcessor.read(inputFactory.createXMLStreamReader(is));
+        assertNotNull(constrainingType);
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        staxProcessor.write(constrainingType, outputFactory.createXMLStreamWriter(bos));
+    }
+
+    @Test
+    public void testReadWriteComposite() throws Exception {
+        InputStream is = getClass().getResourceAsStream("Calculator.composite");
+        Composite composite = (Composite)staxProcessor.read(inputFactory.createXMLStreamReader(is));
+        assertNotNull(composite);
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos));
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XMLDocumentHelperTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XMLDocumentHelperTestCase.java?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XMLDocumentHelperTestCase.java (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XMLDocumentHelperTestCase.java Sat Apr 25 11:58:38 2009
@@ -0,0 +1,52 @@
+/*
+ * 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.sca.interfacedef.wsdl.xml;
+
+import java.net.URL;
+
+import javax.xml.stream.XMLInputFactory;
+
+import org.apache.tuscany.sca.xsd.xml.XMLDocumentHelper;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @version $Rev: 723274 $ $Date: 2008-12-04 10:14:09 +0000 (Thu, 04 Dec 2008) $
+ */
+public class XMLDocumentHelperTestCase {
+    private URL wsdl;
+    private URL xsd;
+
+    /**
+     * @throws java.lang.Exception
+     */
+    @Before
+    public void setUp() throws Exception {
+        wsdl = getClass().getResource("/wsdl/helloworld-interface.wsdl");
+    }
+
+    @Test
+    public void testReadTNS() throws Exception {
+        String tns = XMLDocumentHelper.readTargetNamespace(wsdl, XMLDocumentHelper.WSDL11, true, "targetNamespace", XMLInputFactory.newInstance());
+        Assert.assertEquals("http://helloworld", tns);
+    }
+
+}

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/Calculator.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/Calculator.composite?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/Calculator.composite (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/Calculator.composite Sat Apr 25 11:58:38 2009
@@ -0,0 +1,55 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+	xmlns:calc="http://sample.calculator"
+	targetNamespace="http://calc"
+	xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
+	name="Calculator">
+
+    <service name="CalculatorService" promote="CalculatorServiceComponent">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"
+        	wsdli:wsdlLocation="http://tempuri.org"/>
+    </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>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorComponent.constrainingType
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorComponent.constrainingType?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorComponent.constrainingType (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorComponent.constrainingType Sat Apr 25 11:58:38 2009
@@ -0,0 +1,36 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+	xmlns:calc="http://calc"
+    targetNamespace="http://calc"
+    xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance"
+	name="CalculatorComponent">
+
+  <service name="CalculatorService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"
+        	wsdli:wsdlLocation="http://tempuri.org"/>
+  </service>
+
+  <reference name="divideService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Divide)"/>
+  </reference>  
+
+</constrainingType>              
+       
\ No newline at end of file

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorImpl.componentType
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorImpl.componentType?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorImpl.componentType (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/CalculatorImpl.componentType Sat Apr 25 11:58:38 2009
@@ -0,0 +1,33 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+	xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance">
+
+  <service name="CalculatorService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"
+        	wsdli:wsdlLocation="http://tempuri.org"/>
+  </service>
+
+  <reference name="divideService">
+        <interface.wsdl interface="http://sample/calculator#wsdl.interface(Divide)"/>
+  </reference>  
+
+</componentType>              
+       
\ No newline at end of file

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/example.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/example.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/example.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/example.wsdl Sat Apr 25 11:58:38 2009
@@ -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>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/invalid-stockquote.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/invalid-stockquote.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/invalid-stockquote.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/invalid-stockquote.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<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

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/ipo.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/ipo.xsd?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/ipo.xsd (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/ipo.xsd Sat Apr 25 11:58:38 2009
@@ -0,0 +1,136 @@
+<!--
+ * 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.    
+-->
+<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>
+

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/stockquote.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/stockquote.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/stockquote.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/stockquote.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<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

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.wsdl Sat Apr 25 11:58:38 2009
@@ -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:8085/sample-helloworldws-1.0-SNAPSHOT/services/HelloWorldWebService" />
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.xsd?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.xsd (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test1.xsd Sat Apr 25 11:58:38 2009
@@ -0,0 +1,33 @@
+<!--
+ * 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.    
+-->
+<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>
+

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test2.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test2.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test2.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/test2.wsdl Sat Apr 25 11:58:38 2009
@@ -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>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/unwrapped-stockquote.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<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

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/policy/stockquote_policy.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/policy/stockquote_policy.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/policy/stockquote_policy.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/policy/stockquote_policy.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<definitions name="StockQuote" 
+    targetNamespace="http://example.com/stockquote.wsdl"
+    xmlns:tns="http://example.com/stockquote.wsdl" 
+    xmlns:xsd="http://example.com/stockquote.xsd"
+    xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+    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="xsd:getLastTradePrice" />
+    </message>
+
+    <message name="GetLastTradePriceOutput">
+        <part name="body" element="xsd:getLastTradePriceResponse" />
+    </message>
+
+    <portType name="StockQuotePortType" sca:requires="sca:conversational tns:PolicyIntent">
+        <operation name="getLastTradePrice">
+            <input message="tns:GetLastTradePriceInput" />
+            <output message="tns:GetLastTradePriceOutput" />
+        </operation>
+        <operation name="cancel" sca:endsConversation="true"/>
+    </portType>
+
+</definitions>
\ No newline at end of file

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-interface.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-interface.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-interface.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-interface.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,67 @@
+<?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" xmlns:g="http://greeting">
+
+            <!-- 
+                <import namespace="http://greeting" schemaLocation="../xsd/greeting.xsd" />
+            -->
+            <include schemaLocation="../xsd/helloworld.xsd" />
+
+            <element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="name" type="g:Name" />
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="g:Greeting" />
+                    </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>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-service.wsdl
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-service.wsdl?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-service.wsdl (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/wsdl/helloworld-service.wsdl Sat Apr 25 11:58:38 2009
@@ -0,0 +1,49 @@
+<?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="helloworld-interface.wsdl" namespace="http://helloworld"></wsdl:import>
+    <!-- 
+    <wsdl:import 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:8085/sample-helloworldws-1.0-SNAPSHOT/services/HelloWorldWebService" />
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/greeting.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/greeting.xsd?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/greeting.xsd (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/greeting.xsd Sat Apr 25 11:58:38 2009
@@ -0,0 +1,29 @@
+<?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.
+-->
+<schema targetNamespace="http://greeting" xmlns="http://www.w3.org/2001/XMLSchema">
+    <include schemaLocation="name.xsd" />
+    <complexType name="Greeting">
+        <sequence>
+            <element name="message" type="string" />
+            <element name="name" type="Name" />
+        </sequence>
+    </complexType>
+
+</schema>
\ No newline at end of file

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/helloworld.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/helloworld.xsd?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/helloworld.xsd (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/helloworld.xsd Sat Apr 25 11:58:38 2009
@@ -0,0 +1,22 @@
+<?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.
+-->
+<schema targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+    <import namespace="http://greeting" schemaLocation="greeting.xsd" />
+</schema>
\ No newline at end of file

Added: tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/name.xsd
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/name.xsd?rev=768518&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/name.xsd (added)
+++ tuscany/java/sca/modules/interface-wsdl/src/test/resources/xsd/name.xsd Sat Apr 25 11:58:38 2009
@@ -0,0 +1,29 @@
+<?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.
+-->
+<schema targetNamespace="http://greeting" xmlns="http://www.w3.org/2001/XMLSchema">
+
+    <complexType name="Name">
+        <sequence>
+            <element name="firstName" type="string" />
+            <element name="lastName" type="string" />
+        </sequence>
+    </complexType>
+
+</schema>
\ No newline at end of file

Modified: tuscany/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/pom.xml?rev=768518&r1=768517&r2=768518&view=diff
==============================================================================
--- tuscany/java/sca/modules/pom.xml (original)
+++ tuscany/java/sca/modules/pom.xml Sat Apr 25 11:58:38 2009
@@ -80,7 +80,6 @@
         <module>interface-java-jaxws</module>
         <module>interface-java-xml</module>
         <module>interface-wsdl</module>
-        <module>interface-wsdl-xml</module>
         <module>launcher</module>
         <module>monitor</module>
         <module>myfaces</module>