cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r795162 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
Date Fri, 17 Jul 2009 17:39:41 GMT
Author: dkulp
Date: Fri Jul 17 17:39:40 2009
New Revision: 795162

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

........
  r795160 | dkulp | 2009-07-17 13:35:14 -0400 (Fri, 17 Jul 2009) | 2 lines
  
  Fix an issue with xmlbeans where a wsdl:import of a schema (instead of
  a schema import) would not generate types.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 17 17:39:40 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java?rev=795162&r1=795161&r2=795162&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
Fri Jul 17 17:39:40 2009
@@ -66,6 +66,7 @@
 import org.apache.xmlbeans.impl.schema.StscState;
 import org.apache.xmlbeans.impl.tool.CodeGenUtil;
 import org.apache.xmlbeans.impl.util.FilerImpl;
+import org.apache.xmlbeans.impl.xb.substwsdl.TImport;
 import org.apache.xmlbeans.impl.xb.xmlconfig.ConfigDocument;
 import org.apache.xmlbeans.impl.xb.xmlconfig.Extensionconfig;
 import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
@@ -267,9 +268,22 @@
             XmlObject urldoc = loader.parse(url, null, options);
 
             if (urldoc instanceof org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument)
{
+                org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument wsdldoc = 
+                    (org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument)urldoc;
+                
                 addWsdlSchemas(url.toString(),
-                               (org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument)urldoc,
+                               wsdldoc,
                                errorListener, scontentlist);
+                
+                for (TImport imp : wsdldoc.getDefinitions().getImportArray()) {
+                    if (imp.getLocation().toLowerCase().endsWith(".xsd")) {
+                        URL url1 = new URL(url, imp.getLocation());
+                        XmlObject urldoc2 = loader.parse(url1, null, options);
+                        addSchema(url1.toString(), (SchemaDocument)urldoc2, errorListener,
false,
+                                  scontentlist);
+                    }
+                }
+
             } else if (urldoc instanceof SchemaDocument) {
                 addSchema(url.toString(), (SchemaDocument)urldoc, errorListener, false,
                           scontentlist);
@@ -411,6 +425,7 @@
         StscState.addInfo(errorListener, "Loading wsdl file " + name);
         XmlOptions opts = new XmlOptions().setErrorListener(errorListener);
         XmlObject[] types = wsdldoc.getDefinitions().getTypesArray();
+        
         int count = 0;
         for (int j = 0; j < types.length; j++) {
             XmlObject[] schemas = types[j]



Mime
View raw message