cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r688593 - in /cxf/trunk/rt/databinding/aegis/src: main/java/org/apache/cxf/aegis/type/ test/java/org/apache/cxf/aegis/integration/ test/java/org/apache/cxf/aegis/services/
Date Mon, 25 Aug 2008 01:10:24 GMT
Author: bimargulies
Date: Sun Aug 24 18:10:23 2008
New Revision: 688593

URL: http://svn.apache.org/viewvc?rev=688593&view=rev
Log:
Add unit test for copying part attributes from Aegis to parts. Fix Aegis array types to 
have min-max instead of max-min in the names.

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java?rev=688593&r1=688592&r2=688593&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
Sun Aug 24 18:10:23 2008
@@ -316,13 +316,13 @@
         String localName = "ArrayOf" + first.toUpperCase() + last;
         if (info.nonDefaultAttributes()) {
             localName += "-";
-            if (info.getMaxOccurs() >= 0) {
-                localName += info.maxOccurs;
-            }
-            localName += "-";
             if (info.getMinOccurs() >= 0) {
                 localName += info.minOccurs;
             }
+            localName += "-";
+            if (info.getMaxOccurs() >= 0) {
+                localName += info.maxOccurs;
+            }
             if (info.isFlat()) {
                 localName += "Flat";
             }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java?rev=688593&r1=688592&r2=688593&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ParameterMappingTest.java
Sun Aug 24 18:10:23 2008
@@ -70,7 +70,7 @@
         WSDLFactory.newInstance().newWSDLWriter().writeWSDL(def, sink);
         assertXPathEquals("/wsdl:definitions/wsdl:types/"
                     + "xsd:schema[@targetNamespace= 'http://services.aegis.cxf.apache.org']"
-                    + "/xsd:complexType[@name='ArrayOfString-50-2']" 
+                    + "/xsd:complexType[@name='ArrayOfString-2-50']" 
                     + "/xsd:sequence" 
                     + "/xsd:element[@name='string']/@minOccurs", "2", doc);
     }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java?rev=688593&r1=688592&r2=688593&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
Sun Aug 24 18:10:23 2008
@@ -20,7 +20,9 @@
 
 import javax.xml.namespace.QName;
 
+import org.w3c.dom.Document;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.services.ArrayService;
@@ -43,7 +45,7 @@
         createService(BeanService.class, "BeanService");
         createService(ArrayService.class, arrayService, "Array", new QName("urn:Array", "Array"));
     }
-
+    
     @Test
     public void testBeanService() throws Exception {
         Node response = invoke("BeanService", "bean11.xml");
@@ -55,6 +57,13 @@
         assertValid("//sb:getSimpleBeanResponse/sb:return/beanz:howdy[text()=\"howdy\"]",
response);
         assertValid("//sb:getSimpleBeanResponse/sb:return/beanz:bleh[text()=\"bleh\"]", response);
     }
+    
+    @Test
+    public void testArrayWsdl() throws Exception {
+        Document doc = getWSDLDocument("Array");
+        NodeList stuff = assertValid("//xsd:complexType[@name='ArrayOfString-2-50']", doc);
+        assertEquals(1, stuff.getLength());
+    }
 
     @Test
     public void testBeanServiceWSDL() throws Exception {
@@ -133,66 +142,4 @@
         assertEquals("after items", arrayService.getAfterValue());
     }
 
-    // public void testGetArray()
-    // throws Exception
-    // {
-    // Document response = invokeService("Array",
-    // "/org/codehaus/xfire/message/wrapped/GetStringArray11.xml");
-    //
-    // addNamespace("a", "urn:Array");
-    // addNamespace("sb", "http://test.java.xfire.codehaus.org");
-    // assertValid("//a:getStringArrayResponse", response);
-    // assertValid("//a:getStringArrayResponse/a:out/a:string", response);
-    // }
-    //    
-    // public void testArrayService()
-    // throws Exception
-    // {
-    // Document response = invokeService("Array",
-    // "/org/codehaus/xfire/message/wrapped/SubmitStringArray11.xml");
-    //
-    // addNamespace("a", "urn:Array");
-    // addNamespace("sb", "http://test.java.xfire.codehaus.org");
-    // assertValid("//a:SubmitStringArrayResponse", response);
-    // assertValid("//a:SubmitStringArrayResponse/a:out[text()='true']",
-    // response);
-    // }
-    //
-    // public void testArrayServiceNoWhitespace()
-    // throws Exception
-    // {
-    // Document response = invokeService("Array",
-    // "/org/codehaus/xfire/message/wrapped/SubmitStringArray11NoWS.xml");
-    //
-    // addNamespace("a", "urn:Array");
-    // addNamespace("sb", "http://test.java.xfire.codehaus.org");
-    // assertValid("//a:SubmitStringArrayResponse", response);
-    // assertValid("//a:SubmitStringArrayResponse/a:out[text()='true']",
-    // response);
-    // }
-    //
-    // public void testArrayServiceWSDL()
-    // throws Exception
-    // {
-    // Document doc = getWSDLDocument("Array");
-    //
-    // addNamespace("wsdl", WSDLWriter.WSDL11_NS);
-    // addNamespace("wsdlsoap", WSDLWriter.WSDL11_SOAP_NS);
-    // addNamespace("xsd", SoapConstants.XSD);
-    //
-    // assertValid("/wsdl:definitions/wsdl:types", doc);
-    // assertValid("/wsdl:definitions/wsdl:types/xsd:schema", doc);
-    // assertValid("/wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='urn:Array']",
-    // doc);
-    // assertValid("//xsd:schema[@targetNamespace='urn:Array']/xsd:element[@name='SubmitBeanArray']",
-    // doc);
-    // assertValid(
-    // "//xsd:element[@name='SubmitStringArray']/xsd:complexType/xsd:sequence/xsd:element"
-    //    + "[@name='array'][@type='tns:ArrayOfString']",
-    // doc);
-    // assertValid(
-    // "//xsd:element[@name='SubmitBeanArray']/xsd:complexType/xsd:sequence/xsd:element"
-    //  + "[@name='array'][@type='ns1:ArrayOfSimpleBean']",
-    // doc);
-    // }
 }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml?rev=688593&r1=688592&r2=688593&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.aegis.xml
Sun Aug 24 18:10:23 2008
@@ -20,7 +20,7 @@
 <mappings>
     <mapping name="ArrayService">
         <method name="submitStringArray">
-            <parameter index="0" minOccurs='2' maxOccurs='50' />
+            <parameter index="0" minOccurs='2' maxOccurs='50' nillable='false' />
         </method>
     </mapping>
 </mappings>



Mime
View raw message