cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r592073 - in /incubator/cxf/branches/2.0.x-fixes: ./ tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
Date Mon, 05 Nov 2007 16:35:54 GMT
Author: dkulp
Date: Mon Nov  5 08:35:53 2007
New Revision: 592073

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

........
  r591870 | mmao | 2007-11-04 21:26:37 -0500 (Sun, 04 Nov 2007) | 4 lines
  
  CXF-1169
   * wsdl2java suppress validation warning by default
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.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/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=592073&r1=592072&r2=592073&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Mon Nov  5 08:35:53 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/branches/2.0.x-fixes/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java?rev=592073&r1=592072&r2=592073&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
Mon Nov  5 08:35:53 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