cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r602043 - in /incubator/cxf/branches/2.0.x-fixes: ./ tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/ tools/validator/src/test/java/org/apache/cxf/...
Date Fri, 07 Dec 2007 09:18:19 GMT
Author: mmao
Date: Fri Dec  7 01:18:18 2007
New Revision: 602043

URL: http://svn.apache.org/viewvc?rev=602043&view=rev
Log:
Merged revisions 602028 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r602028 | mmao | 2007-12-07 16:54:46 +0800 (Fri, 07 Dec 2007) | 4 lines
  
  CXF-1273
    WSDLRefValidator can not pass if the type is xsd:anyType
........

Added:
    incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
      - copied unchanged from r602028, incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?rev=602043&r1=602042&r2=602043&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
Fri Dec  7 01:18:18 2007
@@ -559,8 +559,12 @@
                     schemaCollection.getElementByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));
                 partvalid = schemaEle != null ? true : false;
             } else {
+                if ("anyType".equals(name)) {
+                    return true;
+                }
                 XmlSchemaType schemaType =
                     schemaCollection.getTypeByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));
+
                 partvalid = schemaType != null ? true : false;
             }
 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java?rev=602043&r1=602042&r2=602043&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
Fri Dec  7 01:18:18 2007
@@ -140,4 +140,15 @@
             assertEquals(expected, e.getMessage());
         }
     }
+
+    @Test
+    public void testXSDAnyType() throws Exception {
+        String wsdl = getClass().getResource("resources/anytype.wsdl").toURI().toString();
+        try {
+            WSDLRefValidator validator = new WSDLRefValidator(wsdl);
+            assertTrue(validator.isValid());
+        } catch (Exception e) {
+            fail("Valid wsdl, no exception should be thrown" + e.getMessage());
+        }
+    }
 }



Mime
View raw message