summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-09-08 20:43:56 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-09-08 20:43:56 +0000
commit5575ba3e47ff0c656c0a89ca2db04a54f39c1714 (patch)
tree44a1eb4d713bba058ee2d17e88105e02ed44a2e9 /sca-java-2.x
parent89f0d319b59f642ac17c73e6982baaca902244e4 (diff)
Commit commented out test for TUSCANY-3943.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1166896 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java20
-rw-r--r--sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl66
2 files changed, 85 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
index ea02d8c3d6..c2d6f40416 100644
--- a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
+++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
@@ -31,6 +31,7 @@ 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.Ignore;
import org.junit.Test;
/**
@@ -65,10 +66,27 @@ public class WrapperStyleOperationTestCase extends AbstractWSDLTestCase {
definition = resolver.resolveModel(WSDLDefinition.class, definition, context);
PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver, context.getMonitor());
- WSDLOperation op = (WSDLOperation) wi.getOperations().get(1);
+ WSDLOperation op = (WSDLOperation) wi.getOperations().get(0);
+ Assert.assertTrue(op.isWrapperStyle());
+ op = (WSDLOperation) wi.getOperations().get(1);
Assert.assertFalse(op.isWrapperStyle());
op = (WSDLOperation) wi.getOperations().get(2);
Assert.assertFalse(op.isWrapperStyle());
}
+
+ @Test
+ @Ignore("TUSCANY-3943")
+ public final void testDisabledWrappedOperation() throws Exception {
+ ProcessorContext context = new ProcessorContext();
+ URL url = getClass().getResource("../xml/disabledwrapped-stockquote.wsdl");
+ WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, new URI("disabledwrapped-stockquote.wsdl"), url, context);
+ resolver.addModel(definition, context);
+ definition = resolver.resolveModel(WSDLDefinition.class, definition, context);
+ PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME);
+ WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver, context.getMonitor());
+ WSDLOperation op = (WSDLOperation) wi.getOperations().get(0);
+ Assert.assertFalse(op.isWrapperStyle());
+ }
+
}
diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
new file mode 100644
index 0000000000..1d8d7ec097
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
@@ -0,0 +1,66 @@
+<?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:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <jaxws:bindings>
+ <!-- Non-wrapped by virtue of the fact that wrappering has been disabled -->
+ <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
+ </jaxws:bindings>
+
+ <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>
+
+
+ <portType name="StockQuotePortType">
+ <operation name="getLastTradePrice">
+ <input message="tns:GetLastTradePriceInput1" />
+ <output message="tns:GetLastTradePriceOutput1" />
+ </operation>
+ </portType>
+
+</definitions>