tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scottk...@apache.org
Subject svn commit: r1166896 - in /tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test: java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/ resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/
Date Thu, 08 Sep 2011 20:43:56 GMT
Author: scottkurz
Date: Thu Sep  8 20:43:56 2011
New Revision: 1166896

URL: http://svn.apache.org/viewvc?rev=1166896&view=rev
Log:
Commit commented out test for TUSCANY-3943.

Added:
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
Modified:
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java

Modified: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java?rev=1166896&r1=1166895&r2=1166896&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
Thu Sep  8 20:43:56 2011
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.interfaced
 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 WrapperStyleOperationTestCa
         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());
+    }
+
 }

Added: tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl?rev=1166896&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
(added)
+++ tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl
Thu Sep  8 20:43:56 2011
@@ -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>



Mime
View raw message