< prev index next >

src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java

Print this page
rev 1143 : 8182054: Improve wsdl support
Summary: Also reviewed by Roman Grigoriadi <roman.grigoriadi@oracle.com>
Reviewed-by: joehw, lancea

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -77,10 +77,19 @@
     /**
      * -Xnocompile
      */
     public boolean nocompile;
 
+    /**
+     * If true XML security features when parsing XML documents will be disabled.
+     * The default value is false.
+     *
+     * Boolean
+     * @since 2.2.9
+     */
+    public boolean disableXmlSecurity;
+
     public enum Target {
         V2_0, V2_1, V2_2;
 
         /**
          * Returns true if this version is equal or later than the given one.

@@ -308,10 +317,13 @@
             keep = true;
             if (!sourceDir.exists()) {
                 throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(sourceDir.getPath()));
             }
             return 2;
+        } else if (args[i].equals("-disableXmlSecurity")) {
+            disableXmlSecurity();
+            return 1;
         } else if (args[i].equals("-extension")) {
             compatibilityMode = EXTENSION;
             return 1;
         } else if (args[i].startsWith("-help")) {
             WeAreDone done = new WeAreDone();

@@ -324,10 +336,15 @@
             return 1;
         }
         return 0;
     }
 
+    // protected method to allow overriding
+    protected void disableXmlSecurity() {
+        disableXmlSecurity= true;
+    }
+
     /**
      * Obtains an operand and reports an error if it's not there.
      */
     public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException {
         //if (i == args.length || args[i].startsWith("-")) {
< prev index next >