cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterjo...@apache.org
Subject svn commit: r540738 - in /incubator/cxf/trunk/tools/validator/src: main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
Date Tue, 22 May 2007 20:33:10 GMT
Author: peterjones
Date: Tue May 22 13:33:09 2007
New Revision: 540738

URL: http://svn.apache.org/viewvc?view=rev&rev=540738
Log:
Minor ibmjdk fix for validator tests.

Modified:
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?view=diff&rev=540738&r1=540737&r2=540738
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
Tue May 22 13:33:09 2007
@@ -181,7 +181,7 @@
             Node node = (Node) xpather.getValue(fNode.toString(), doc, XPathConstants.NODE);
             if (null != node) {
                 return new FailureLocation((Location)node.getUserData(WSDLConstants.NODE_LOCATION),
-                                           doc.getBaseURI());
+                                           doc.getDocumentURI());
             }
         }
         return null;

Modified: incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java?view=diff&rev=540738&r1=540737&r2=540738
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
Tue May 22 13:33:09 2007
@@ -78,18 +78,23 @@
     }
 
     @Test
-    public void testNoTeypRef() throws Exception {
+    public void testNoTypeRef() throws Exception {
         String wsdl = getClass().getResource("resources/NoTypeRef.wsdl").toURI().toString();
         WSDLRefValidator validator = new WSDLRefValidator(wsdl);
         assertFalse(validator.isValid());
         assertEquals(3, validator.getValidationResults().getErrors().size());
 
-        String t = validator.getValidationResults().getErrors().pop();
-
         String expected = "Part <header_info> in Message "
             + "<{http://apache.org/samples/headers}inHeaderRequest>"
             + " referenced Type <{http://apache.org/samples/headers}SOAPHeaderInfo>
"
             + "can not be found in the schemas";
+        String t = null;
+        while (!validator.getValidationResults().getErrors().empty()) {
+            t = validator.getValidationResults().getErrors().pop();
+            if (expected.equals(t)) {
+                break;
+            }
+        }
         assertEquals(expected, t);
     }
 



Mime
View raw message