Index: CMDIValidator/trunk/cmdi-validator-core/pom.xml
===================================================================
--- CMDIValidator/trunk/cmdi-validator-core/pom.xml	(revision 7018)
+++ CMDIValidator/trunk/cmdi-validator-core/pom.xml	(revision 7019)
@@ -6,5 +6,5 @@
         <groupId>eu.clarin.cmdi</groupId>
         <artifactId>cmdi-validator</artifactId>
-        <version>0.0.6-SNAPSHOT</version>
+        <version>0.0.7-SNAPSHOT</version>
     </parent>
     <artifactId>cmdi-validator-core</artifactId>
Index: CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDISchemaLoader.java
===================================================================
--- CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDISchemaLoader.java	(revision 7018)
+++ CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDISchemaLoader.java	(revision 7019)
@@ -69,5 +69,6 @@
 
     public CMDISchemaLoader(File cacheDirectory, long maxCacheAge,
-            long maxNegativeCacheAge) {
+            long maxNegativeCacheAge, int connectTimeout,
+            int socketTimeout) {
         if (cacheDirectory == null) {
             throw new NullPointerException("cacheDirectory == null");
@@ -82,10 +83,16 @@
         this.maxCacheAge         = maxCacheAge;
         this.maxNegativeCacheAge = maxNegativeCacheAge;
-        this.httpClient          = createHttpClient(2500, 5000);
-    }
-
+        this.httpClient          = createHttpClient(connectTimeout, socketTimeout);
+    }
+
+
+    public CMDISchemaLoader(File cacheDirectory, long maxCacheAge, int connectTimeout,
+            int socketTimeout) {
+        this(cacheDirectory, maxCacheAge, TimeUnit.HOURS.toMillis(1), 
+                connectTimeout, socketTimeout);
+    }
 
     public CMDISchemaLoader(File cacheDirectory, long maxCacheAge) {
-        this(cacheDirectory, maxCacheAge, TimeUnit.HOURS.toMillis(1));
+        this(cacheDirectory, maxCacheAge, TimeUnit.HOURS.toMillis(1), 2500, 5000);
     }
 
@@ -167,4 +174,6 @@
                     return new FileInputStream(cacheDataFile);
                 } catch (IOException e) {
+                    logger.error("downloading schema from '{}' failed", schemaLocation);
+                    logger.error("cause:", e);
                     failed = true;
                     throw e;
Index: CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidator.java
===================================================================
--- CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidator.java	(revision 7018)
+++ CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidator.java	(revision 7019)
@@ -132,6 +132,11 @@
     private Result result = null;
 
-
+    
     public CMDIValidator(final CMDIValidatorConfig config)
+            throws CMDIValidatorInitException {
+        this(config, config.getRoot(), config.getHandler());
+    }
+
+    public CMDIValidator(final CMDIValidatorConfig config, final File src, CMDIValidationHandler handler)
             throws CMDIValidatorInitException {
         if (config == null) {
@@ -230,10 +235,10 @@
          * other stuff
          */
-        final TFile root = new TFile(config.getRoot());
+        final TFile root = new TFile(src);
         this.files       = new FileEnumerator(root, config.getFileFilter());
         if (config.getHandler() == null) {
             throw new NullPointerException("handler == null");
         }
-        this.handler = config.getHandler();
+        this.handler = handler;
     }
 
@@ -331,4 +336,6 @@
     private static CMDISchemaLoader initSchemaLoader(
             final CMDIValidatorConfig config) throws CMDIValidatorInitException {
+        int connectTimeout = config.getConnectTimeout();
+        int socketTimeout = config.getSocketTimeout();
         File cacheDirectory = config.getSchemaCacheDirectory();
         if (cacheDirectory == null) {
@@ -369,5 +376,5 @@
             }
         }
-        return new CMDISchemaLoader(cacheDirectory, CMDISchemaLoader.DISABLE_CACHE_AGING);
+        return new CMDISchemaLoader(cacheDirectory, CMDISchemaLoader.DISABLE_CACHE_AGING, connectTimeout, socketTimeout);
     }
 
Index: CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidatorConfig.java
===================================================================
--- CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidatorConfig.java	(revision 7018)
+++ CMDIValidator/trunk/cmdi-validator-core/src/main/java/eu/clarin/cmdi/validator/CMDIValidatorConfig.java	(revision 7019)
@@ -33,4 +33,6 @@
     private boolean schematronDisabled = false;
     private List<CMDIValidatorExtension> extensions = null;
+    private int connectTimeout = 2500;
+    private int socketTimeout = 5000;
 
 
@@ -92,4 +94,12 @@
 
 
+    public int getConnectTimeout() {
+        return connectTimeout;
+    }
+    
+    public int getSocketTimeout() {
+        return socketTimeout;
+    }
+    
     public static class Builder {
         private final CMDIValidatorConfig config;
@@ -171,4 +181,13 @@
         }
 
+        public Builder connectTimeout(int connectTimeout) {
+            config.connectTimeout = connectTimeout;
+            return this;
+        }
+
+        public Builder socketTimeout(int socketTimeout) {
+            config.socketTimeout = socketTimeout;
+            return this;
+        }
 
         public CMDIValidatorConfig build() {
Index: CMDIValidator/trunk/cmdi-validator-tool/pom.xml
===================================================================
--- CMDIValidator/trunk/cmdi-validator-tool/pom.xml	(revision 7018)
+++ CMDIValidator/trunk/cmdi-validator-tool/pom.xml	(revision 7019)
@@ -6,5 +6,5 @@
         <groupId>eu.clarin.cmdi</groupId>
         <artifactId>cmdi-validator</artifactId>
-        <version>0.0.6-SNAPSHOT</version>
+        <version>0.0.7-SNAPSHOT</version>
     </parent>
     <artifactId>cmdi-validator-tool</artifactId>
Index: CMDIValidator/trunk/pom.xml
===================================================================
--- CMDIValidator/trunk/pom.xml	(revision 7018)
+++ CMDIValidator/trunk/pom.xml	(revision 7019)
@@ -5,5 +5,5 @@
     <groupId>eu.clarin.cmdi</groupId>
     <artifactId>cmdi-validator</artifactId>
-    <version>0.0.6-SNAPSHOT</version>
+    <version>0.0.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
