servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoeh...@apache.org
Subject svn commit: r674766 - /servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
Date Tue, 08 Jul 2008 11:17:26 GMT
Author: kkoehler
Date: Tue Jul  8 04:17:25 2008
New Revision: 674766

URL: http://svn.apache.org/viewvc?rev=674766&view=rev
Log:
[SM-1445] SOAPEndpoint doesn't import schema recursively - fix

Modified:
    servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java

Modified: servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java?rev=674766&r1=674765&r2=674766&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
(original)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
Tue Jul  8 04:17:25 2008
@@ -435,23 +435,28 @@
                 ExtensibilityElement ee = (ExtensibilityElement) it.next();
                 if (ee instanceof Schema) {
                     Schema schema = (Schema) ee;
-                    Map schemaImports = schema.getImports();
-                    for (Iterator iter = schemaImports.values().iterator(); iter.hasNext();)
{
-                        List imps = (List) iter.next();
-                        for (Iterator iterator = imps.iterator(); iterator.hasNext();) {
-                            SchemaImport schemaImport = (SchemaImport) iterator.next();
-                            Schema schemaImp = schemaImport.getReferencedSchema();
-                            String schemaLoc = schemaImport.getSchemaLocationURI();
-                            if (schemaLoc != null && schemaImp != null &&
schemaImp.getElement() != null && !URI.create(schemaLoc).isAbsolute()) {
-                                wsdls.put(schemaLoc, schemaImp.getElement());
-                            }
-                        }
-                    }
+                    mapSchemaImport(schema);                
                 }
             }
         }
     }
 
+    private void mapSchemaImport(Schema schema) {
+        Map schemaImports = schema.getImports();
+        for (Iterator iter = schemaImports.values().iterator(); iter.hasNext();) {
+            List imps = (List) iter.next();
+            for (Iterator iterator = imps.iterator(); iterator.hasNext();) {
+                SchemaImport schemaImport = (SchemaImport) iterator.next();
+                Schema schemaImp = schemaImport.getReferencedSchema();
+                String schemaLoc = schemaImport.getSchemaLocationURI();
+                if (schemaLoc != null && schemaImp != null && schemaImp.getElement()
!= null && !URI.create(schemaLoc).isAbsolute()) {
+                    wsdls.put(schemaLoc, schemaImp.getElement());
+                    mapSchemaImport(schemaImp);
+                }
+            }
+        }
+    }
+    
     /**
      * @return Returns the wsdls.
      */



Mime
View raw message