http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
index 8a04ec3,7fd77fe..3f5f92a
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
@@@ -26,9 -34,8 +34,8 @@@ import org.apache.oodt.cas.filemgr.stru
  import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
  import 
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
  import 
org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
  
- //JDK imports
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
@@@ -59,10 -56,9 +56,9 @@@ import java.util.logging.Logger
   * 
   */
  public class CatalogSearch {
- 
-     private static QueryParser parser;
+     private static Logger LOG = 
Logger.getLogger(CatalogSearch.class.getName());
  
 -    private static XmlRpcFileManagerClient client;
 +    private static FileManagerClient client;
  
      private static String freeTextBlock = "__FREE__";
  

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/DeleteProduct.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ExpImpCatalog.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ExpImpCatalog.java
index af71d0e,28f6742..fae94ac
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ExpImpCatalog.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ExpImpCatalog.java
@@@ -50,11 -50,12 +50,12 @@@ import java.util.logging.Logger
   */
  public class ExpImpCatalog {
  
+ 
      /* the client to the source catalog to export */
 -    private XmlRpcFileManagerClient sourceClient = null;
 +    private FileManagerClient sourceClient = null;
  
      /* the client to the dest catalog to import into */
 -    private XmlRpcFileManagerClient destClient = null;
 +    private FileManagerClient destClient = null;
  
      /* a source catalog I/F to export from (if no fm client is desired) */
      private Catalog srcCatalog = null;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/MetadataBasedProductMover.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/MetadataDumper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ProductDumper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
----------------------------------------------------------------------
diff --cc filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
index 7154043,343408a..b079e67
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
@@@ -37,20 -36,15 +36,16 @@@ import org.apache.oodt.cas.filemgr.stru
  import 
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
  import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
  import org.apache.oodt.cas.filemgr.structs.query.QueryResult;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.filemgr.util.SqlParser;
  
- //APACHE imports
- import org.apache.lucene.index.Term;
- import org.apache.lucene.queryParser.ParseException;
- import org.apache.lucene.queryParser.QueryParser;
- import org.apache.lucene.search.BooleanClause;
- import org.apache.lucene.search.BooleanQuery;
- import org.apache.lucene.search.PhraseQuery;
- import org.apache.lucene.search.Query;
- import org.apache.lucene.search.RangeQuery;
- import org.apache.lucene.search.TermQuery;
+ import java.net.MalformedURLException;
+ import java.net.URL;
+ import java.util.List;
+ import java.util.Vector;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
  
  /**
   * @author mattmann
@@@ -66,10 -60,10 +61,10 @@@ public final class QueryTool 
  
      private static String freeTextBlock = "__FREE__";
  
 -    private XmlRpcFileManagerClient client = null;
 +    private FileManagerClient client = null;
  
-     private static enum QueryType { LUCENE, SQL }; 
-     
+     private enum QueryType { LUCENE, SQL }
+ 
      /* our log stream */
      private static final Logger LOG = 
Logger.getLogger(QueryTool.class.getName());
  

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/UseMockClientCmdLineActionStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetPrevPageCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestCachedIngester.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestCachedIngester.java
index 7f778a9,5531865..a072cca
--- 
a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestCachedIngester.java
+++ 
b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestCachedIngester.java
@@@ -30,17 -23,27 +23,28 @@@ package org.apache.oodt.cas.filemgr.ing
  import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
  import org.apache.oodt.cas.filemgr.structs.Product;
  import org.apache.oodt.cas.filemgr.structs.exceptions.CacheException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerServer;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.metadata.Metadata;
  import org.apache.oodt.cas.metadata.SerializableMetadata;
- 
- // Jnit imports
  import org.apache.oodt.commons.util.DateConvert;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.net.URL;
+ import java.util.Date;
+ import java.util.List;
+ import java.util.Properties;
+ import java.util.Vector;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+ 
  import junit.framework.TestCase;
  
+ //OODT imports
+ // Jnit imports
+ 
  /**
   * @author mattmann
   * @version $Revision$
@@@ -50,10 -53,10 +54,10 @@@
   * </p>.
   */
  public class TestCachedIngester extends TestCase {
- 
-     private static final int FM_PORT = 50011;
+     private static Logger LOG = 
Logger.getLogger(TestCachedIngester.class.getName());
+     private static final int FM_PORT = 50010;
  
 -    private XmlRpcFileManager fm;
 +    private FileManagerServer fm;
  
      private String luceneCatLoc;
  
@@@ -282,10 -284,9 +285,10 @@@
          System.setProperties(properties);
  
          try {
 -            fm = new XmlRpcFileManager(FM_PORT);
 +            fm = RpcCommunicationFactory.createServer(FM_PORT);
 +            fm.startUp();
          } catch (Exception e) {
-             e.printStackTrace();
+             LOG.log(Level.SEVERE, e.getMessage());
              fail(e.getMessage());
          }
      }

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestLocalCache.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestLocalCache.java
index ce706db,ef1300c..2c88ff7
--- 
a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestLocalCache.java
+++ 
b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestLocalCache.java
@@@ -19,20 -19,13 +19,12 @@@
  package org.apache.oodt.cas.filemgr.ingest;
  
  //JDK imports
- import java.io.File;
- import java.io.FileInputStream;
- import java.net.URL;
- import java.util.Date;
- import java.util.List;
- import java.util.Properties;
- import java.util.Vector;
  
- //OODT imports
  import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
  import org.apache.oodt.cas.filemgr.structs.Product;
 -import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 -import org.apache.oodt.cas.filemgr.util.XmlRpcStructFactory;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerServer;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.metadata.Metadata;
  import org.apache.oodt.cas.metadata.SerializableMetadata;
  import org.apache.oodt.commons.util.DateConvert;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestRmiCache.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestRmiCache.java
index 35b698e,d8521a9..5ba6e33
--- a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestRmiCache.java
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestRmiCache.java
@@@ -19,11 -19,13 +19,12 @@@
  package org.apache.oodt.cas.filemgr.ingest;
  
  //OODT imports
+ 
  import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
  import org.apache.oodt.cas.filemgr.structs.Product;
 -import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 -import org.apache.oodt.cas.filemgr.util.XmlRpcStructFactory;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerServer;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.metadata.Metadata;
  import org.apache.oodt.cas.metadata.SerializableMetadata;
  import org.apache.oodt.commons.util.DateConvert;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestStdIngester.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/structs/type/TestTypeHandler.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/structs/type/TestTypeHandler.java
index e14689f,2017817..15e6e8f
--- 
a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/structs/type/TestTypeHandler.java
+++ 
b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/structs/type/TestTypeHandler.java
@@@ -36,10 -30,19 +30,15 @@@ import org.apache.oodt.cas.filemgr.stru
  import org.apache.oodt.cas.filemgr.structs.TermQueryCriteria;
  import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
  import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
 -import 
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
  import org.apache.oodt.cas.filemgr.validation.ValidationLayer;
  import org.apache.oodt.cas.metadata.Metadata;
+ import org.apache.oodt.commons.database.DatabaseConnectionBuilder;
+ import org.apache.oodt.commons.database.SqlScript;
+ import org.apache.oodt.commons.pagination.PaginationUtils;
+ import org.apache.xmlrpc.XmlRpcException;
+ 
  import java.io.File;
  import java.io.FileInputStream;
 -import java.io.IOException;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.sql.Connection;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/TestXmlRpcFileManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestExpImpCatalog.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestExpImpCatalog.java
index a22d0c2,8822765..320c3a1
--- 
a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestExpImpCatalog.java
+++ 
b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestExpImpCatalog.java
@@@ -47,12 -50,12 +51,12 @@@ import junit.framework.TestCase
   * </p>.
   */
  public class TestExpImpCatalog extends TestCase {
- 
+     private static Logger LOG = 
Logger.getLogger(TestExpImpCatalog.class.getName());
      private static final int FM_PORT = 50010;
  
 -    private XmlRpcFileManager fm;
 +    private FileManagerServer fm;
  
 -    private XmlRpcFileManager fm2;
 +    private FileManagerServer fm2;
  
      private ExpImpCatalog expImp;
  

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestMetadataBasedProductMover.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java
----------------------------------------------------------------------
diff --cc 
filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java
index a17fa7a,ef1b0f1..543378e
--- 
a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java
+++ 
b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java
@@@ -26,14 -27,12 +27,12 @@@ import org.apache.oodt.cas.filemgr.stru
  import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
  import 
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
  import org.apache.oodt.cas.filemgr.structs.type.TypeHandler;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerServer;
  import org.apache.oodt.cas.metadata.Metadata;
  
- //Google imports
  import com.google.common.collect.Lists;
  
- //JDK imports
  import java.io.File;
  import java.io.FileInputStream;
  import java.net.MalformedURLException;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pcs/core/src/main/java/org/apache/oodt/pcs/util/FileManagerUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pcs/core/src/main/java/org/apache/oodt/pcs/util/WorkflowManagerUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java
----------------------------------------------------------------------
diff --cc pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java
index dd15ab8,5ce2d30..3ae7668
--- a/pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java
+++ b/pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java
@@@ -85,15 -49,12 +49,13 @@@ import org.apache.oodt.cas.workflow.met
  import org.apache.oodt.cas.workflow.structs.WorkflowTaskConfiguration;
  import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance;
  import 
org.apache.oodt.cas.workflow.structs.exceptions.WorkflowTaskInstanceException;
 -import org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient;
 +import org.apache.oodt.cas.workflow.system.WorkflowManagerClient;
 +import org.apache.oodt.cas.workflow.system.rpc.RpcCommunicationFactory;
  import org.apache.oodt.cas.workflow.util.ScriptFile;
+ import org.apache.oodt.commons.exceptions.CommonsException;
  import org.apache.oodt.commons.exec.ExecUtils;
+ import org.apache.xmlrpc.XmlRpcException;
  
- //Spring imports
- import org.springframework.context.support.FileSystemXmlApplicationContext;
- 
- //Google imports
  import com.google.common.base.Splitter;
  import com.google.common.base.Strings;
  import com.google.common.collect.Lists;
@@@ -270,10 -254,10 +255,10 @@@ public class PGETaskInstance implement
        String url = pgeMetadata.getMetadata(WORKFLOW_MANAGER_URL);
        logger.info("Creating WorkflowManager client for url [" + url + "]");
        Validate.notNull(url, "Must specify " + WORKFLOW_MANAGER_URL);
 -      return new XmlRpcWorkflowManagerClient(new URL(url));
 +      return RpcCommunicationFactory.createClient(new URL(url));
     }
  
-    protected String getWorkflowInstanceId() throws Exception {
+    protected String getWorkflowInstanceId() {
        String instanceId = 
pgeMetadata.getMetadata(CoreMetKeys.WORKFLOW_INST_ID);
        logger.info("Workflow instanceId is [" + instanceId + "]");
        Validate.notNull(instanceId, "Must specify "

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pge/src/main/java/org/apache/oodt/cas/pge/staging/FileStager.java
----------------------------------------------------------------------
diff --cc pge/src/main/java/org/apache/oodt/cas/pge/staging/FileStager.java
index 0a679e7,5b35e04..78e959c
--- a/pge/src/main/java/org/apache/oodt/cas/pge/staging/FileStager.java
+++ b/pge/src/main/java/org/apache/oodt/cas/pge/staging/FileStager.java
@@@ -84,14 -86,14 +86,14 @@@ public abstract class FileStager 
     }
  
     @VisibleForTesting
-    static FileManagerClient createFileManagerClient(PgeMetadata pgeMetadata)
-          throws Exception {
+    static XmlRpcFileManagerClient createFileManagerClient(PgeMetadata 
pgeMetadata)
+        throws PGEException, MalformedURLException, ConnectionException {
        String filemgrUrl = pgeMetadata.getMetadata(QUERY_FILE_MANAGER_URL);
        if (filemgrUrl == null) {
-          throw new Exception("Must specify [" + QUERY_FILE_MANAGER_URL
+          throw new PGEException("Must specify [" + QUERY_FILE_MANAGER_URL
                 + "] if you want to stage product IDs");
        }
 -      return new XmlRpcFileManagerClient(new URL(filemgrUrl));
 +      return RpcCommunicationFactory.createClient(new URL(filemgrUrl));
     }
  
     @VisibleForTesting

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pge/src/main/java/org/apache/oodt/cas/pge/util/XmlHelper.java
----------------------------------------------------------------------
diff --cc pge/src/main/java/org/apache/oodt/cas/pge/util/XmlHelper.java
index 2ecd268,44e1f9c..8c53aff
--- a/pge/src/main/java/org/apache/oodt/cas/pge/util/XmlHelper.java
+++ b/pge/src/main/java/org/apache/oodt/cas/pge/util/XmlHelper.java
@@@ -16,56 -16,8 +16,9 @@@
   */
  package org.apache.oodt.cas.pge.util;
  
- //OODT static imports
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.ARGS_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.CMD_TAG;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.CREATE_BEFORE_EXEC_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.CUSTOM_METADATA_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.DIR_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.DIR_TAG;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.DYN_INPUT_FILES_TAG;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.ENV_REPLACE_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.ENV_REPLACE_NO_RECUR_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.EXE_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.FILE_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.FILE_STAGING_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.FILE_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.FILES_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.FORCE_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.IMPORT_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.KEYREF_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.KEY_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.KEY_GEN_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.METADATA_KEY_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.METADATA_TAG;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.MET_FILE_WRITER_CLASS_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.NAME_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.NAMING_EXPR_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.NAMESPACE_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.OUTPUT_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.PATH_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.RENAMING_CONV_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.REGEX_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.SHELL_TYPE_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.SPLIT_ATTR;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.STAGE_FILES_TAG;
- import static org.apache.oodt.cas.pge.config.PgeConfigMetKeys.VAL_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.WORKFLOW_MET_ATTR;
- import static 
org.apache.oodt.cas.pge.config.PgeConfigMetKeys.WRITER_CLASS_ATTR;
- import static 
org.apache.oodt.cas.pge.metadata.PgeTaskMetKeys.QUERY_FILE_MANAGER_URL;
- 
- //JDK imports
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.Arrays;
- import java.util.List;
- 
- //OODT imports
+ import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
  import org.apache.oodt.cas.filemgr.util.QueryUtils;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.filemgr.util.SqlParser;
  import org.apache.oodt.cas.metadata.Metadata;
  import org.apache.oodt.cas.metadata.filenaming.PathUtilsNamingConvention;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pge/src/test/java/org/apache/oodt/cas/pge/TestPGETaskInstance.java
----------------------------------------------------------------------
diff --cc pge/src/test/java/org/apache/oodt/cas/pge/TestPGETaskInstance.java
index 8a04a2c,985ab77..808a51b
--- a/pge/src/test/java/org/apache/oodt/cas/pge/TestPGETaskInstance.java
+++ b/pge/src/test/java/org/apache/oodt/cas/pge/TestPGETaskInstance.java
@@@ -87,8 -35,8 +35,7 @@@ import org.apache.oodt.cas.pge.metadata
  import org.apache.oodt.cas.pge.writers.MockDynamicConfigFileWriter;
  import org.apache.oodt.cas.workflow.metadata.CoreMetKeys;
  import org.apache.oodt.cas.workflow.structs.WorkflowTaskConfiguration;
 -import org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient;
  
- //Google imports
  import com.google.common.collect.Lists;
  import com.google.common.collect.Maps;
  import com.google.common.collect.Sets;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/pge/src/test/java/org/apache/oodt/cas/pge/staging/TestFileStager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/profile/src/main/java/org/apache/oodt/profile/handlers/cas/CASProfileHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/components/src/main/java/org/apache/oodt/cas/webcomponents/filemgr/FileManagerConn.java
----------------------------------------------------------------------
diff --cc 
webapp/components/src/main/java/org/apache/oodt/cas/webcomponents/filemgr/FileManagerConn.java
index 647ffd2,cdcf4c7..6deafc3
--- 
a/webapp/components/src/main/java/org/apache/oodt/cas/webcomponents/filemgr/FileManagerConn.java
+++ 
b/webapp/components/src/main/java/org/apache/oodt/cas/webcomponents/filemgr/FileManagerConn.java
@@@ -30,10 -24,15 +24,16 @@@ import org.apache.oodt.cas.filemgr.stru
  import org.apache.oodt.cas.filemgr.structs.Reference;
  import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
  import 
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
 +import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
  import org.apache.oodt.cas.metadata.Metadata;
  
+ import java.net.URL;
+ import java.util.List;
+ import java.util.Vector;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+ 
  /**
   * 
   * Describe your class here.

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/CASProductHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
----------------------------------------------------------------------
diff --cc 
webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
index f172b99,bb932b6..eeb1369
--- 
a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
+++ 
b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
@@@ -63,9 -59,10 +60,10 @@@ public class DatasetDeliveryServlet ext
  
    /* serial version UID */
    private static final long serialVersionUID = -6692665690674186105L;
+   public static final int INT = 512;
  
    /* our file manager client */
 -  private XmlRpcFileManagerClient client;
 +  private FileManagerClient client;
  
    /* the working dir in which to create huge zip files */
    private String workingDirPath;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
----------------------------------------------------------------------
diff --cc 
webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
index 2ba5cf7,534cd16..273a976
--- 
a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
+++ 
b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
@@@ -35,8 -21,9 +21,9 @@@ import org.apache.oodt.cas.filemgr.stru
  import org.apache.oodt.cas.filemgr.structs.Product;
  import org.apache.oodt.cas.filemgr.structs.ProductType;
  import org.apache.oodt.cas.filemgr.structs.Reference;
 -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 +import org.apache.oodt.cas.filemgr.system.FileManagerClient;
  import org.apache.oodt.cas.metadata.Metadata;
+ import org.apache.oodt.cas.product.exceptions.CasProductException;
  import org.apache.oodt.cas.product.jaxrs.exceptions.BadRequestException;
  import org.apache.oodt.cas.product.jaxrs.exceptions.NotFoundException;
  import org.apache.oodt.cas.product.jaxrs.resources.DatasetResource;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/servlets/CasProductJaxrsServlet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
----------------------------------------------------------------------
diff --cc 
webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
index 3940e38,14fd8c4..224a396
--- 
a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
+++ 
b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
@@@ -112,16 -110,12 +110,12 @@@ public class RSSProductTransferServlet 
                "filemgr.url") );
          } catch (Exception e) {
            throw new ServletException("Failed to get filemgr url : " + 
e.getMessage(), e);
-         }        
-         if (fileManagerUrl == null) {
-             // try the default port
-             fileManagerUrl = "http://localhost:9000";;
          }
  
-         fClient = null;
+       fClient = null;
  
          try {
 -            fClient = new XmlRpcFileManagerClient(new URL(fileManagerUrl));
 +            fClient = RpcCommunicationFactory.createClient(new 
URL(fileManagerUrl));
          } catch (MalformedURLException e) {
              LOG.log(Level.SEVERE,
                      "Unable to initialize file manager url in RSS Servlet: 
[url="

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/cli/action/GetFirstPageCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/cli/action/GetLastPageCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/cli/action/GetNextPageCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/cli/action/GetPrevPageCliAction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/examples/BranchRedirector.java
----------------------------------------------------------------------
diff --cc 
workflow/src/main/java/org/apache/oodt/cas/workflow/examples/BranchRedirector.java
index da505c7,8af329f..8c56c8f
--- 
a/workflow/src/main/java/org/apache/oodt/cas/workflow/examples/BranchRedirector.java
+++ 
b/workflow/src/main/java/org/apache/oodt/cas/workflow/examples/BranchRedirector.java
@@@ -55,11 -54,11 +55,11 @@@ public class BranchRedirector implement
    @Override
    public void run(Metadata metadata, WorkflowTaskConfiguration config)
        throws WorkflowTaskInstanceException {
-     WorkflowManagerClient wm = null;
+     XmlRpcWorkflowManagerClient wm;
  
      try {
 -      wm = new XmlRpcWorkflowManagerClient(new URL(
 -          metadata.getMetadata(CoreMetKeys.WORKFLOW_MANAGER_URL)));
 +      wm = RpcCommunicationFactory.createClient(new URL(
 +              metadata.getMetadata(CoreMetKeys.WORKFLOW_MANAGER_URL)));
        wm.sendEvent(config.getProperty("eventName"), metadata);
      } catch (Exception e) {
        throw new WorkflowTaskInstanceException(e.getMessage());

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/examples/RandomStatusUpdateTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
----------------------------------------------------------------------
diff --cc 
workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
index 4967c4c,f6975df..c10c8ef
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
@@@ -176,10 -175,9 +176,9 @@@ public class TaskJob implements JobInst
          }
      }
  
 -    private XmlRpcWorkflowManagerClient getWmClientFromMetadata(Metadata met) 
{
 +    private WorkflowManagerClient getWmClientFromMetadata(Metadata met) {
          String workflowMgrUrlStr = met.getMetadata(WORKFLOW_MANAGER_URL);
-         if (workflowMgrUrlStr == null
-                 || (workflowMgrUrlStr != null && 
workflowMgrUrlStr.equals(""))) {
+         if (workflowMgrUrlStr == null || (workflowMgrUrlStr.equals(""))) {
              // try to default to a workflow mgr on localhost
              // most likely won't work, but worth trying
              workflowMgrUrlStr = "http://localhost:9001";;

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowInstancePage.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
----------------------------------------------------------------------
diff --cc 
workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
index ef704c2,0256602..db30098
--- 
a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
+++ 
b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
@@@ -64,56 -57,57 +57,57 @@@ import static org.apache.oodt.cas.workf
   * @author mattmann (Chris Mattmann)
   * @author bfoster (Brian Foster)
   */
 -public class XmlRpcWorkflowManager {
 +public class XmlRpcWorkflowManager implements WorkflowManager {
  
-    private static final Logger LOG = 
Logger.getLogger(XmlRpcWorkflowManager.class.getName());
+   private static final Logger LOG = 
Logger.getLogger(XmlRpcWorkflowManager.class.getName());
  
+   public static final int DEFAULT_WEB_SERVER_PORT = 9001;
+   public static final String XML_RPC_HANDLER_NAME = "workflowmgr";
  
-    public static final String XML_RPC_HANDLER_NAME = "workflowmgr";
+   public static final String PROPERTIES_FILE_PROPERTY = 
"org.apache.oodt.cas.workflow.properties";
+   public static final String WORKFLOW_ENGINE_FACTORY_PROPERTY = 
"workflow.engine.factory";
+   public static final String ENGINE_RUNNER_FACTORY_PROPERTY = 
"workflow.engine.runner.factory";
+   public static final String WORKFLOW_REPOSITORY_FACTORY_PROPERTY = 
"workflow.repo.factory";
  
+   private WebServer webServer;
+   private final WorkflowEngine engine;
+   private WorkflowRepository repo;
  
-    private final int webServerPort;
-    private WebServer webServer;
-    private final WorkflowEngine engine;
-    private WorkflowRepository repo;
- 
-    public XmlRpcWorkflowManager() {
-       this(DEFAULT_WEB_SERVER_PORT);
-    }
+   public XmlRpcWorkflowManager() {
+     this(DEFAULT_WEB_SERVER_PORT);
+   }
  
-    public XmlRpcWorkflowManager(int port) {
-       Preconditions.checkArgument(port > 0, "Must specify a port greater than 
0");
-       webServerPort = port;
+   public XmlRpcWorkflowManager(int port) {
+     Preconditions.checkArgument(port > 0, "Must specify a port greater than 
0");
  
-       engine = getWorkflowEngineFromProperty();
-       engine.setWorkflowManagerUrl(safeGetUrlFromString("http://";
-             + getHostname() + ":" + this.webServerPort));
-       repo = getWorkflowRepositoryFromProperty();
+     engine = getWorkflowEngineFromProperty();
+     engine.setWorkflowManagerUrl(safeGetUrlFromString("http://";
+                                                       + getHostname() + ":" + 
port));
+     repo = getWorkflowRepositoryFromProperty();
  
-       // start up the web server
-       webServer = new WebServer(webServerPort);
-       webServer.addHandler(XML_RPC_HANDLER_NAME, this);
-       webServer.start();
+     // start up the web server
+     webServer = new WebServer(port);
+     webServer.addHandler(XML_RPC_HANDLER_NAME, this);
+     webServer.start();
  
-       LOG.log(Level.INFO, "Workflow Manager started by "
-             + System.getProperty("user.name", "unknown"));
-    }
+     LOG.log(Level.INFO, "Workflow Manager started by "
+                         + System.getProperty("user.name", "unknown"));
+   }
  
-    @Override
-    public boolean shutdown() {
-       if (webServer != null) {
-          webServer.shutdown();
-          webServer = null;
-          return true;
-       } else
-          return false;
-    }
+   public boolean shutdown() {
+     if (webServer != null) {
+       webServer.shutdown();
+       webServer = null;
+       return true;
+     } else {
+       return false;
+     }
+   }
  
-    public boolean refreshRepository()
-        throws RepositoryException {
-      repo = getWorkflowRepositoryFromProperty();
-      return true;
-    }
+   public boolean refreshRepository() {
+     repo = getWorkflowRepositoryFromProperty();
+     return true;
+   }
  
    public String executeDynamicWorkflow(Vector<String> taskIds, Hashtable 
metadata)
        throws RepositoryException, EngineException {

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java
----------------------------------------------------------------------
diff --cc 
workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java
index e1607b9,b6355a8..2bf78f5
--- 
a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java
+++ 
b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java
@@@ -75,24 -78,15 +78,17 @@@ public class XmlRpcWorkflowManagerClien
          workflowManagerUrl = url;
      }
      
 +    @Override
      public boolean refreshRepository()
-         throws Exception {
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.refreshRepository", new Vector()))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+         throws XmlRpcException, IOException {
+             return (Boolean) client.execute(
+                 "workflowmgr.refreshRepository", new Vector());
+ 
      }
  
 +  @Override
    public String executeDynamicWorkflow(List<String> taskIds, Metadata 
metadata)
-       throws Exception {
+       throws XmlRpcException, IOException {
      Vector argList = new Vector();
      Vector<String> taskIdVector = new Vector<String>();
      taskIdVector.addAll(taskIds);
@@@ -148,9 -121,8 +123,9 @@@
          return 
XmlRpcStructFactory.getWorkflowInstancePageFromXmlRpc(pageHash);
      }
  
 +    @Override
      public WorkflowInstancePage getNextPage(WorkflowInstancePage currentPage)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(XmlRpcStructFactory
                  .getXmlRpcWorkflowInstancePage(currentPage));
@@@ -208,43 -166,29 +170,31 @@@
          return 
XmlRpcStructFactory.getWorkflowInstancePageFromXmlRpc(pageHash);
      }
  
 +    @Override
      public WorkflowInstancePage paginateWorkflowInstances(int pageNum,
-             String status) throws Exception {
+             String status) throws XmlRpcException, IOException {
          Vector argList = new Vector();
-         argList.add(new Integer(pageNum));
+         argList.add(pageNum);
          argList.add(status);
-         Hashtable pageHash = null;
+         Map pageHash;
  
-         try {
-             pageHash = (Hashtable) client.execute(
+             pageHash = (Map) client.execute(
                      "workflowmgr.paginateWorkflowInstances", argList);
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+ 
  
          return 
XmlRpcStructFactory.getWorkflowInstancePageFromXmlRpc(pageHash);
      }
  
 +    @Override
      public WorkflowInstancePage paginateWorkflowInstances(int pageNum)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
-         argList.add(new Integer(pageNum));
-         Hashtable pageHash = null;
+         argList.add(pageNum);
+         Map pageHash;
  
-         try {
-             pageHash = (Hashtable) client.execute(
+             pageHash = (Map) client.execute(
                      "workflowmgr.paginateWorkflowInstances", argList);
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+ 
  
          return 
XmlRpcStructFactory.getWorkflowInstancePageFromXmlRpc(pageHash);
      }
@@@ -299,9 -230,8 +236,9 @@@
          return met;
      }
  
 +    @Override
      public synchronized boolean setWorkflowInstanceCurrentTaskStartDateTime(
-             String wInstId, String startDateTimeIsoStr) throws Exception {
+             String wInstId, String startDateTimeIsoStr) throws 
XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(wInstId);
          argList.add(startDateTimeIsoStr);
@@@ -319,99 -243,59 +250,65 @@@
  
      }
  
 +    @Override
      public double getWorkflowCurrentTaskWallClockMinutes(String 
workflowInstId)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
  
-         try {
-             return ((Double) client.execute(
-                     "workflowmgr.getWorkflowCurrentTaskWallClockMinutes",
-                     argList)).doubleValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+             return (Double) client.execute(
+                 "workflowmgr.getWorkflowCurrentTaskWallClockMinutes",
+                 argList);
+ 
      }
  
 +    @Override
      public double getWorkflowWallClockMinutes(String workflowInstId)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
  
-         try {
-             return ((Double) client.execute(
-                     "workflowmgr.getWorkflowWallClockMinutes", argList))
-                     .doubleValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+             return (Double) client.execute(
+                 "workflowmgr.getWorkflowWallClockMinutes", argList);
+ 
      }
  
 +    @Override
      public synchronized boolean stopWorkflowInstance(String workflowInstId)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
  
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.stopWorkflowInstance", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+             return (Boolean) client.execute(
+                 "workflowmgr.stopWorkflowInstance", argList);
+ 
      }
  
 +    @Override
      public synchronized boolean pauseWorkflowInstance(String workflowInstId)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
  
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.pauseWorkflowInstance", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+             return (Boolean) client.execute(
+                 "workflowmgr.pauseWorkflowInstance", argList);
+ 
      }
  
 +    @Override
      public synchronized boolean resumeWorkflowInstance(String workflowInstId)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
  
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.resumeWorkflowInstance", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+             return (Boolean) client.execute(
+                 "workflowmgr.resumeWorkflowInstance", argList);
+ 
      }
  
 +    @Override
      public synchronized boolean setWorkflowInstanceCurrentTaskEndDateTime(
-             String wInstId, String endDateTimeIsoStr) throws Exception {
+             String wInstId, String endDateTimeIsoStr) throws XmlRpcException, 
IOException {
          Vector argList = new Vector();
          argList.add(wInstId);
          argList.add(endDateTimeIsoStr);
@@@ -429,9 -307,8 +320,9 @@@
  
      }
  
 +    @Override
      public synchronized boolean updateWorkflowInstanceStatus(
-             String workflowInstId, String status) throws Exception {
+             String workflowInstId, String status) throws XmlRpcException, 
IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
          argList.add(status);
@@@ -449,103 -319,62 +333,67 @@@
  
      }
  
 +    @Override
      public synchronized boolean updateWorkflowInstance(WorkflowInstance 
instance)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(XmlRpcStructFactory.getXmlRpcWorkflowInstance(instance));
  
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.updateWorkflowInstance", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
+       return (Boolean) client.execute(
+                 "workflowmgr.updateWorkflowInstance", argList);
+ 
      }
  
 +    @Override
      public synchronized boolean updateMetadataForWorkflow(
-             String workflowInstId, Metadata metadata) throws Exception {
+             String workflowInstId, Metadata metadata) throws XmlRpcException, 
IOException {
          Vector argList = new Vector();
          argList.add(workflowInstId);
-         argList.add(metadata.getHashtable());
+         argList.add(metadata.getHashTable());
+ 
+             return (Boolean) client.execute(
+                 "workflowmgr.updateMetadataForWorkflow", argList);
  
-         try {
-             return ((Boolean) client.execute(
-                     "workflowmgr.updateMetadataForWorkflow", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
  
      }
  
 +    @Override
      public boolean sendEvent(String eventName, Metadata metadata)
-             throws Exception {
+         throws XmlRpcException, IOException {
          Vector argList = new Vector();
          argList.add(eventName);
-         argList.add(metadata.getHashtable());
+         argList.add(metadata.getHashTable());
+ 
+             return (Boolean) client
+                 .execute("workflowmgr.handleEvent", argList);
  
-         try {
-             return ((Boolean) client
-                     .execute("workflowmgr.handleEvent", argList))
-                     .booleanValue();
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             throw new Exception(e.getMessage());
-         }
      }
  
-     @Override
-     public WorkflowTask getTaskById(String taskId) throws Exception {
+     public WorkflowTask getTaskById(String taskId) throws XmlRpcException, 
IOException, RepositoryException {
          Vector argList = new Vector();
          argList.add(taskId);
  
-         try {
-             Hashtable t = (Hashtable) 
client.execute("workflowmgr.getTaskById",
+             Map t = (Map) client.execute("workflowmgr.getTaskById",
                      argList);
              return XmlRpcStructFactory.getWorkflowTaskFromXmlRpc(t);
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         }
+ 
      }
  
 +    @Override
      public WorkflowCondition getConditionById(String conditionId)
-             throws Exception {
+         throws XmlRpcException, IOException, RepositoryException {
          Vector argList = new Vector();
          argList.add(conditionId);
  
-         try {
-             Hashtable c = (Hashtable) client.execute(
+             Map c = (Map) client.execute(
                      "workflowmgr.getConditionById", argList);
              return XmlRpcStructFactory.getWorkflowConditionFromXmlRpc(c);
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         }
+ 
      }
  
 +    @Override
      public WorkflowInstance getWorkflowInstanceById(String wInstId)
-             throws Exception {
+         throws XmlRpcException, IOException, RepositoryException {
          Vector argList = new Vector();
          argList.add(wInstId);
  
@@@ -668,55 -454,46 +473,41 @@@
                      "workflowmgr.getWorkflowInstancesByStatus", argList);
              if (insts != null) {
                  instsUnpacked = new Vector(insts.size());
-                 for (Iterator i = insts.iterator(); i.hasNext();) {
-                     Hashtable hWinst = (Hashtable) i.next();
-                     WorkflowInstance inst = XmlRpcStructFactory
-                             .getWorkflowInstanceFromXmlRpc(hWinst);
-                     instsUnpacked.add(inst);
-                 }
+               for (Object inst1 : insts) {
+                 Map hWinst = (Map) inst1;
+                 WorkflowInstance inst = XmlRpcStructFactory
+                     .getWorkflowInstanceFromXmlRpc(hWinst);
+                 instsUnpacked.add(inst);
+               }
                  return instsUnpacked;
-             } else
-                 return null;
+             } else {
+               return null;
+             }
+ 
  
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         }
      }
  
-     @Override
-     public Vector getWorkflowInstances() throws Exception {
+     public List getWorkflowInstances() throws XmlRpcException, IOException {
          Vector argList = new Vector();
-         Vector insts = null;
-         Vector instsUnpacked = null;
- 
-         try {
-             insts = (Vector) 
client.execute("workflowmgr.getWorkflowInstances",
-                     argList);
-             if (insts != null) {
-                 instsUnpacked = new Vector(insts.size());
-                 for (Iterator i = insts.iterator(); i.hasNext();) {
-                     Hashtable hWinst = (Hashtable) i.next();
-                     WorkflowInstance inst = XmlRpcStructFactory
-                             .getWorkflowInstanceFromXmlRpc(hWinst);
-                     instsUnpacked.add(inst);
-                 }
-                 return instsUnpacked;
-             } else
-                 return null;
- 
-         } catch (XmlRpcException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         } catch (IOException e) {
-             e.printStackTrace();
-             throw new Exception(e.getMessage());
-         }
+         Vector insts;
+         Vector instsUnpacked;
+ 
+           insts = (Vector) client.execute("workflowmgr.getWorkflowInstances",
+               argList);
+           if (insts != null) {
+             instsUnpacked = new Vector(insts.size());
+             for (Object inst1 : insts) {
+               Map hWinst = (Map) inst1;
+               WorkflowInstance inst = XmlRpcStructFactory
+                   .getWorkflowInstanceFromXmlRpc(hWinst);
+               instsUnpacked.add(inst);
+             }
+             return instsUnpacked;
+           } else {
+             return null;
+           }
      }
  
 -    public static void main(String[] args) {
 -       CmdLineUtility cmdLineUtility = new CmdLineUtility();
 -       cmdLineUtility.run(args);
 -    }
 -
      /**
       * @return Returns the workflowManagerUrl.
       */

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/main/java/org/apache/oodt/cas/workflow/tools/InstanceRepoCleaner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/oodt/blob/fa572a2e/workflow/src/test/java/org/apache/oodt/cas/workflow/cli/UseMockClientCmdLineActionStore.java
----------------------------------------------------------------------
diff --cc 
workflow/src/test/java/org/apache/oodt/cas/workflow/cli/UseMockClientCmdLineActionStore.java
index 84e1a0d,361f54d..ca6730d
--- 
a/workflow/src/test/java/org/apache/oodt/cas/workflow/cli/UseMockClientCmdLineActionStore.java
+++ 
b/workflow/src/test/java/org/apache/oodt/cas/workflow/cli/UseMockClientCmdLineActionStore.java
@@@ -17,18 -17,18 +17,18 @@@
  package org.apache.oodt.cas.workflow.cli;
  
  //JDK imports
- import java.util.Set;
- 
- //OODT imports
  import org.apache.oodt.cas.cli.action.CmdLineAction;
  import org.apache.oodt.cas.cli.action.store.spring.SpringCmdLineActionStore;
- import org.apache.oodt.cas.cli.exception.CmdLineActionStoreException;
  import org.apache.oodt.cas.workflow.cli.action.WorkflowCliAction;
 -import org.apache.oodt.cas.workflow.system.MockXmlRpcWorkflowManagerClient;
 +import org.apache.oodt.cas.workflow.system.MockWorkflowManagerClient;
  
+ import java.util.Set;
+ 
+ //OODT imports
+ 
  /**
   * A {@link SpringCmdLineActionStore} which sets {@link WorkflowCliAction}s
 - * to use a {@link MockXmlRpcWorkflowManagerClient}.
 + * to use a {@link MockWorkflowManagerClient}.
   *
   * @author bfoster (Brian Foster)
   */

Reply via email to