From a3c48da9bb8971497d414f86e352123d95b9c3da Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 20 Nov 2009 23:53:35 +0000 Subject: Moving 2.x trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882795 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/ws/xml/ReadTestCase.java | 106 ---------------- .../tuscany/sca/binding/ws/xml/WriteTestCase.java | 82 ------------- .../ws/xml/Calculator-bad-wsdlElement.composite | 59 --------- .../sca/binding/ws/xml/Calculator.composite | 63 ---------- .../binding/ws/xml/CalculatorImpl.componentType | 45 ------- .../binding/ws/xml/PoliciedCalculator.composite | 60 --------- .../apache/tuscany/sca/binding/ws/xml/example.wsdl | 26 ---- .../sca/binding/ws/xml/invalid-stockquote.wsdl | 58 --------- .../org/apache/tuscany/sca/binding/ws/xml/ipo.xsd | 136 --------------------- .../tuscany/sca/binding/ws/xml/stockquote.wsdl | 58 --------- .../apache/tuscany/sca/binding/ws/xml/test1.wsdl | 45 ------- .../apache/tuscany/sca/binding/ws/xml/test1.xsd | 33 ----- .../apache/tuscany/sca/binding/ws/xml/test2.wsdl | 63 ---------- .../sca/binding/ws/xml/unwrapped-stockquote.wsdl | 76 ------------ 14 files changed, 910 deletions(-) delete mode 100644 java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java delete mode 100644 java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl delete mode 100644 java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl (limited to 'java/sca/modules/binding-ws/src/test') diff --git a/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java b/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java deleted file mode 100644 index 85d41bd15c..0000000000 --- a/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.xml; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.fail; - -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.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.ProcessorContext; -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.BeforeClass; -import org.junit.Test; - -/** - * Test reading WSDL interfaces. - * - * @version $Rev$ $Date$ - */ -public class ReadTestCase { - - private static XMLInputFactory inputFactory; - private static StAXArtifactProcessor staxProcessor; - private static ProcessorContext context; - - @BeforeClass - public static void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - context = new ProcessorContext(extensionPoints); - inputFactory = XMLInputFactory.newInstance(); - StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); - staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null); - } - - @Test - public void testReadComponentType() throws Exception { - InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - ComponentType componentType = (ComponentType)staxProcessor.read(reader, context); - assertNotNull(componentType); - } - - @Test - public void testReadComposite() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - Composite composite = (Composite)staxProcessor.read(reader, context); - assertNotNull(composite); - } - - @Test - public void testReadPolicies() throws Exception { - InputStream is = getClass().getResourceAsStream("PoliciedCalculator.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - Composite composite = (Composite)staxProcessor.read(reader, context); - assertNotNull(composite); - } - - /** - * This test makes sure that an exception is thrown when a bad wsdlElement is present along with EndpointReference. - * - * Ref: Web Service Binding Specification v1.0 - Sec 2.1 - Lines 61 to 65. - * When an EndpointReference is present along with the wsdlElement attribute on the parent element, the wsdlElement attribute value MUST - * be of the 'Binding' form. - */ - @Test - public void testReadBadWsdlElement() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator-bad-wsdlElement.composite"); - XMLStreamReader reader = inputFactory.createXMLStreamReader(is); - try { - staxProcessor.read(reader, context); - fail("ContributionReadException expected."); - } catch(ContributionReadException e) { - // Expected - assertNotSame(-1, e.getMessage().indexOf("must use wsdl.binding when using wsa:EndpointReference")); - } - } -} diff --git a/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java b/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java deleted file mode 100644 index 805b1862ce..0000000000 --- a/java/sca/modules/binding-ws/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.ws.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.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.ProcessorContext; -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.BeforeClass; -import org.junit.Test; - -/** - * Test reading/write WSDL interfaces. - * - * @version $Rev$ $Date$ - */ -public class WriteTestCase { - - private static XMLInputFactory inputFactory; - private static XMLOutputFactory outputFactory; - private static StAXArtifactProcessor staxProcessor; - private static ProcessorContext context; - - @BeforeClass - public static void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - context = new ProcessorContext(extensionPoints); - inputFactory = XMLInputFactory.newInstance(); - outputFactory = XMLOutputFactory.newInstance(); - StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); - staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory); - } - - @Test - public void testReadWriteComponentType() throws Exception { - InputStream is = getClass().getResourceAsStream("CalculatorImpl.componentType"); - ComponentType componentType = (ComponentType)staxProcessor.read(inputFactory.createXMLStreamReader(is), context); - assertNotNull(componentType); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - staxProcessor.write(componentType, outputFactory.createXMLStreamWriter(bos), context); - } - - @Test - public void testReadWriteComposite() throws Exception { - InputStream is = getClass().getResourceAsStream("Calculator.composite"); - Composite composite = (Composite)staxProcessor.read(inputFactory.createXMLStreamReader(is), context); - assertNotNull(composite); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos), context); - System.out.println(bos.toString()); - } - -} diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite deleted file mode 100644 index 558365b05e..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator-bad-wsdlElement.composite +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - http://localhost:8085/Calculator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite deleted file mode 100644 index 1952d83755..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/Calculator.composite +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - http://localhost:8085/services/HelloWorldWebService - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType deleted file mode 100644 index 6d36198124..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/CalculatorImpl.componentType +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - myURI - - - - - - \ No newline at end of file diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite deleted file mode 100644 index 036b5f0d1a..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/PoliciedCalculator.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl deleted file mode 100644 index 5e8e5dad0d..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/example.wsdl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl deleted file mode 100644 index ad81fc7867..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/invalid-stockquote.wsdl +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd deleted file mode 100644 index 241ec15d36..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/ipo.xsd +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - International Purchase order schema for Example.com - Copyright 2000 Example.com. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl deleted file mode 100644 index 39cd5547d9..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/stockquote.wsdl +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl deleted file mode 100644 index 8e26f7b4b5..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd deleted file mode 100644 index c2210f4a94..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test1.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl deleted file mode 100644 index 529b395fd5..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/test2.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl b/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl deleted file mode 100644 index 666a7e4069..0000000000 --- a/java/sca/modules/binding-ws/src/test/resources/org/apache/tuscany/sca/binding/ws/xml/unwrapped-stockquote.wsdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3