cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r591870 - in /incubator/cxf/trunk/tools/wsdlto/core/src: main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
Date Mon, 05 Nov 2007 02:26:38 GMT
Author: mmao
Date: Sun Nov  4 18:26:37 2007
New Revision: 591870

URL: http://svn.apache.org/viewvc?rev=591870&view=rev
Log:
CXF-1169
 * wsdl2java suppress validation warning by default


Modified:
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=591870&r1=591869&r2=591870&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Sun Nov  4 18:26:37 2007
@@ -421,6 +421,7 @@
             context.put(ToolConstants.CFG_WSDL_VERSION, WSDLConstants.WSDL11);
         }
 
+        context.put(ToolConstants.CFG_SUPPRESS_WARNINGS, true);
         loadDefaultNSPackageMapping(context);
         setPackageAndNamespaces(context);
         setExcludePackageAndNamespaces(context);

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java?rev=591870&r1=591869&r2=591870&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
Sun Nov  4 18:26:37 2007
@@ -47,6 +47,25 @@
         }
     }
 
+    @Test
+    public void testValidateorSuppressWarningsIsOn() throws Exception {
+        WSDLToJavaContainer container = new WSDLToJavaContainer("dummy", null);
+
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world.wsdl"));
+        container.setContext(context);
+
+        try {
+            container.execute();
+        } catch (ToolException te) {
+            assertEquals(getLogMessage("FOUND_NO_FRONTEND"), te.getMessage());
+        } catch (Exception e) {
+            fail("Should not throw any exception but ToolException.");
+        }
+
+        assertTrue(context.optionSet(ToolConstants.CFG_SUPPRESS_WARNINGS));
+    }
+
     private String getLocation(String wsdlFile) throws URISyntaxException {
         return this.getClass().getResource(wsdlFile).toURI().getPath();
     }



Mime
View raw message