You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by am...@apache.org on 2009/11/13 06:33:34 UTC

svn commit: r835745 - /webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java

Author: amilas
Date: Fri Nov 13 05:33:33 2009
New Revision: 835745

URL: http://svn.apache.org/viewvc?rev=835745&view=rev
Log:
let users to specify arguments starting with X for jaxbri databinding. eg. -EXsync-methods -EXlocator

Modified:
    webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java

Modified: webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java?rev=835745&r1=835744&r2=835745&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java (original)
+++ webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java Fri Nov 13 05:33:33 2009
@@ -224,6 +224,21 @@
                 });
 
                 sc.parseSchema((InputSource) schemaToInputSourceMap.get(key));
+                sc.getOptions().addGrammar((InputSource) schemaToInputSourceMap.get(key));
+
+                for (Object property : properties.keySet()){
+                    String propertyName = (String) property;
+                    if (propertyName.startsWith("X")) {
+                        String[] args = null;
+                        String propertyValue = (String) properties.get(property);
+                        if (propertyValue != null) {
+                            args = new String[]{"-" + propertyName, propertyValue};
+                        } else {
+                            args = new String[]{"-" + propertyName};
+                        }
+                        sc.getOptions().parseArguments(args);
+                    }
+                }
 
                 // Bind the XML
                 S2JJAXBModel jaxbModel = sc.bind();