Author: ajith
Date: Mon Apr 24 02:20:26 2006
New Revision: 396485

URL: http://svn.apache.org/viewcvs?rev=396485&view=rev
Log:
A small fix to handle the case where the schema location is missing for the 
import!

Modified:
    
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/SchemaBuilder.java

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/SchemaBuilder.java
URL: 
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/SchemaBuilder.java?rev=396485&r1=396484&r2=396485&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/SchemaBuilder.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/SchemaBuilder.java
 Mon Apr 24 02:20:26 2006
@@ -1696,7 +1696,7 @@
         schemaImport.schemaLocation =
                 importEl.getAttribute("schemaLocation");
 
-
+        if ((schemaImport.schemaLocation != null) && 
(!schemaImport.schemaLocation.equals(""))) {
             if(schema.getSourceURI()!=null) {
                 schemaImport.schema =
                         resolveXmlSchema(
@@ -1709,7 +1709,7 @@
                                 schemaImport.namespace,
                                 schemaImport.schemaLocation);
             }
-
+        }
         return schemaImport;
     }
 
@@ -1923,27 +1923,5 @@
                collection.baseUri);
 
     }
-//    XmlSchema getXmlSchemaFromLocation(String schemaLocation) {
-//        return getXmlSchemaFromLocation(schemaLocation, collection.baseUri);
-//    }
-//
-//    XmlSchema getXmlSchemaFromLocation(String schemaLocation, String 
baseURI) {
-//
-//        if (baseURI!=null){
-//            if (!isAbsolute(schemaLocation)){
-//                try {
-//                    schemaLocation = getURL(new URL(baseURI), 
schemaLocation).toString();
-//                } catch (Exception e) {
-//                    schemaLocation = baseURI +
-//                                     (schemaLocation.startsWith("/")?"":"/")+
-//                                     schemaLocation;
-//                }
-//            }
-//        }
-//        return collection.read(new InputSource(schemaLocation), null);
-//    }
-
-
-
 
 }


Reply via email to