ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r201570 - /webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java
Date Fri, 24 Jun 2005 06:39:22 GMT
Author: ajith
Date: Thu Jun 23 23:39:20 2005
New Revision: 201570

URL: http://svn.apache.org/viewcvs?rev=201570&view=rev
Log:
Adding the namespace support.The schema element fed to XMLbeans did not have the full namespace
map and caused problems in some wsdl's. Now the complete NS map is fed to the XMLBeans compiler

Modified:
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java?rev=201570&r1=201569&r2=201570&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/extension/XMLBeansExtension.java
Thu Jun 23 23:39:20 2005
@@ -9,6 +9,7 @@
 import org.apache.xmlbeans.Filer;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.XmlOptions;
 import org.apache.wsdl.extensions.DefaultExtensibilityElement;
 import org.apache.wsdl.extensions.ExtensionConstants;
 import org.apache.wsdl.extensions.Schema;
@@ -58,7 +59,11 @@
             extensiblityElt =  (WSDLExtensibilityElement)typesArray.get(i);
             if (ExtensionConstants.SCHEMA.equals(extensiblityElt.getType())) {
                 try {
-                    xmlObjects[i] = XmlObject.Factory.parse(((Schema)extensiblityElt).getElelment());
+                    Element schemaElement = ((Schema)extensiblityElt).getElelment();
+//                    //add the namespaces
+                    XmlOptions options = new XmlOptions();
+                    options.setLoadAdditionalNamespaces(configuration.getWom().getNamespaces());
+                    xmlObjects[i] = XmlObject.Factory.parse(schemaElement,options);
                 } catch (XmlException e) {
                     throw new RuntimeException(e);
                 }



Mime
View raw message