Index: plugins/org.xwiki.eclipse/.classpath
===================================================================
--- plugins/org.xwiki.eclipse/.classpath	(revision 4529)
+++ plugins/org.xwiki.eclipse/.classpath	(working copy)
@@ -6,5 +6,6 @@
 	<classpathentry exported="true" kind="lib" path="lib/xmlrpc-common-3.0.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="lib" path="lib/swizzle-confluence-1.1-20070825-xwiki.jar"/>
 	<classpathentry kind="output" path="target/pdeTemp/plugins/org.xwiki.eclipse_1.0.0/org.xwiki.plugins.eclipse"/>
 </classpath>
Index: plugins/org.xwiki.eclipse/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.xwiki.eclipse/META-INF/MANIFEST.MF	(revision 4529)
+++ plugins/org.xwiki.eclipse/META-INF/MANIFEST.MF	(working copy)
@@ -6,7 +6,8 @@
 Bundle-ClassPath: org.xwiki.plugins.eclipse/,
  lib/ws-commons-util-1.0.1.jar,
  lib/xmlrpc-client-3.0.jar,
- lib/xmlrpc-common-3.0.jar
+ lib/xmlrpc-common-3.0.jar,
+ lib/swizzle-confluence-1.1-20070825-xwiki.jar
 Bundle-Activator: org.xwiki.plugins.eclipse.Activator
 Bundle-Vendor: XWiki
 Require-Bundle: org.eclipse.ui,
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnectionManager.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnectionManager.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnectionManager.java	(working copy)
@@ -23,7 +23,7 @@
 
 import java.util.Collection;
 
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 
 /**
  * Responsible for making and managing {@link IXWikiConnection} objects.
@@ -41,7 +41,7 @@
      * @throws CommunicationException - If XMLRPC call fails.
      */
     public IXWikiConnection connect(String serverUrl, String userName, String password,
-        String proxy) throws CommunicationException;
+        String proxy) throws SwizzleConfluenceException;
 
     /**
      * @return All live connections.
@@ -54,7 +54,7 @@
      * closed at this point.
      * </p>
      * 
-     * @param logintoken Used as a key into connection pool.
+     * @param connection The connection to be closed.
      */
-    public void removeConnection(String loginToken);
+    public void removeConnection(IXWikiConnection connection);
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiSpace.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiSpace.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiSpace.java	(working copy)
@@ -23,7 +23,7 @@
 
 import java.util.Collection;
 
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 
 /**
  * Represents an XWiki Space.
@@ -36,7 +36,7 @@
      * 
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void init() throws CommunicationException;
+    public void init() throws SwizzleConfluenceException;
 
     /**
      * @return Key of this space.
@@ -131,7 +131,7 @@
      * @param content Initial content of the page (XWikiMarkup).
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void addPage(String title, String content) throws CommunicationException;
+    public void addPage(String title, String content) throws SwizzleConfluenceException;
 
     /**
      * Updates an existing page with given information.
@@ -143,7 +143,7 @@
      * @throws CommunicationException - If XMLRPC call fails.
      */
     public void updateChildPage(String pageId, String title, String content, int version)
-        throws CommunicationException;
+        throws SwizzleConfluenceException;
 
     /**
      * Removes the page with given ID from this space.
@@ -151,7 +151,7 @@
      * @param pageId Id of the page which is to be removed.
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void removeChildPage(String pageId) throws CommunicationException;
+    public void removeChildPage(String pageId) throws SwizzleConfluenceException;
 
     /**
      * Saves this space. This method should be invoked in order to make local changes to the space
@@ -160,5 +160,5 @@
      * @return Updated space as returned from the server.
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public IXWikiSpace save() throws CommunicationException;
+    public IXWikiSpace save() throws SwizzleConfluenceException;
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiPage.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiPage.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiPage.java	(working copy)
@@ -23,7 +23,7 @@
 
 import java.util.Date;
 
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 
 /**
  * Represents an XWiki document.
@@ -36,7 +36,7 @@
      * 
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void init() throws CommunicationException;
+    public void init() throws SwizzleConfluenceException;
 
     /**
      * @return pageid As String.
@@ -159,5 +159,5 @@
      * @return Updated page as returned from the server.
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public IXWikiPage save() throws CommunicationException;
+    public IXWikiPage save() throws SwizzleConfluenceException;
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnectionManager.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnectionManager.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnectionManager.java	(working copy)
@@ -23,11 +23,13 @@
 
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
 
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiConnectionManager;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-import org.xwiki.plugins.eclipse.rpc.impl.XWikiRPCHandler;
 
 /**
  * Default implementation of {@link IXWikiConnectionManager}.
@@ -43,14 +45,14 @@
     /**
      * Currently established connections.
      */
-    private HashMap<String, IXWikiConnection> connections;
+    private List<IXWikiConnection> connections;
 
     /**
      * Private constructor. (singleton)
      */
     private XWikiConnectionManager()
     {
-        connections = new HashMap<String, IXWikiConnection>();
+        connections = new LinkedList<IXWikiConnection>();
     }
 
     /**
@@ -71,15 +73,19 @@
      *      java.lang.String, java.lang.String, java.lang.String)
      */
     public IXWikiConnection connect(String serverUrl, String userName, String password,
-        String proxy) throws CommunicationException
+        String proxy) throws SwizzleConfluenceException
     {
-        XWikiConnection con = new XWikiConnection();
-        con.setServerUrl(serverUrl);
-        con.setUserName(userName);
-        con.setLoginToken(XWikiRPCHandler.getInstance().login(serverUrl, userName, password,
-            proxy));
-        connections.put(con.getLoginToken(), con);
-        return con;
+        // TODO the proxy part needs to be done here!
+        Confluence rpc = new Confluence(serverUrl);
+        rpc.login(userName, password);
+
+        XWikiConnection conection = new XWikiConnection();
+        conection.setServerUrl(serverUrl);
+        conection.setUserName(userName);
+        conection.setRpcProxy(rpc);
+        
+        connections.add(conection);
+        return conection;
     }
 
     /**
@@ -89,17 +95,17 @@
      */
     public Collection<IXWikiConnection> getAllConnections()
     {
-        return connections.values();
+        return connections;
     }
 
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnectionManager#removeConnection(java.lang.String)
+     * @see org.xwiki.plugins.eclipse.model.IXWikiConnectionManager#removeConnection(Confluence)
      */
-    public void removeConnection(String loginToken)
+    public void removeConnection(IXWikiConnection connection)
     {
-        connections.remove(loginToken);
+        connections.remove(connection);
     }
 
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiSpace.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiSpace.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiSpace.java	(working copy)
@@ -23,15 +23,20 @@
 
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.List;
 
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.Page;
+import org.codehaus.swizzle.confluence.PageSummary;
+import org.codehaus.swizzle.confluence.Space;
+import org.codehaus.swizzle.confluence.SpaceSummary;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.swt.graphics.Image;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiPage;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
 import org.xwiki.plugins.eclipse.model.adapters.TreeAdapter;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiSpaceWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-import org.xwiki.plugins.eclipse.rpc.impl.XWikiRPCHandler;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiConstants;
 
@@ -52,14 +57,17 @@
     private HashMap<String, IXWikiPage> pagesByID;
 
     /**
-     * Summary of this space.
+     * Summary of this space. 
      */
-    private HashMap<String, Object> summary;
+    private SpaceSummary summary;
+    // TODO This is (almost) a subset of the space. Why do we need both ?
+    // -- in general summaries are exact subsets ... here it's an anomaly and should be treated as such
+    // -- especially since xwiki does not have a notion of space type
 
     /**
      * Complete data for this space.
      */
-    private HashMap<String, Object> data;
+    private Space space;
 
     /**
      * Whether this space should be displayed or not.
@@ -83,11 +91,10 @@
      * @param parent Parent connection of this space.
      * @param summary Summary of this space.
      */
-    protected XWikiSpace(IXWikiConnection parent, HashMap<String, Object> summary)
+    protected XWikiSpace(IXWikiConnection wikiConnection, SpaceSummary summary)
     {
         pagesByID = new HashMap<String, IXWikiPage>();
-      //  pagesByTitle = new HashMap<String, IXWikiPage>();
-        data = new HashMap<String, Object>();
+        space = new Space();
         setSummary(summary);
         setConnection(parent);
     }
@@ -96,25 +103,26 @@
      * Creates a new space. Clients should use {@link IXWikiConnection#getSpaces()} and similar
      * methods.
      * 
-     * @param parent Parent connection of this space.
+     * @param connection Parent connection of this space.
      * @param summary Summary of this space.
-     * @param data Data of this space.
+     * @param space Data of this space.
      */
-    protected XWikiSpace(IXWikiConnection parent, HashMap<String, Object> summary,
-        HashMap<String, Object> data)
+    protected XWikiSpace(IXWikiConnection connection, SpaceSummary summary, Space space)
     {
-        this(parent, summary);
-        this.data = data;
+        this(connection, summary);
+        this.space = space;
     }
 
+
+
     /**
      * Used by internal code to initialize this space.
      * 
-     * @param data Data (core) of this space.
+     * @param space Data (core) of this space.
      */
-    protected void setData(HashMap<String, Object> data)
+    protected void setSpace(Space space)
     {
-        this.data = data;
+        this.space = space;
     }
 
     /**
@@ -143,7 +151,7 @@
      * 
      * @param summary Summary of this space.
      */
-    protected void setSummary(HashMap<String, Object> summary)
+    protected void setSummary(SpaceSummary summary)
     {
         this.summary = summary;
     }
@@ -179,7 +187,7 @@
             IXWikiSpace space = new XWikiSpaceWrapper(this);
             try {
                 space.init();
-            } catch (CommunicationException e) {
+            } catch (SwizzleConfluenceException e) {
                 // Will be logged elsewhere
             }
             if (!isPagesReady()) {
@@ -244,22 +252,20 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#initialize()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isDataReady()) {
-            String loginToken = getConnection().getLoginToken();
+            Confluence rpc = getConnection().getRpcProxy();
             String spaceKey = getKey();
-            this.data =
-                (HashMap<String, Object>) XWikiRPCHandler.getInstance().getSpace(loginToken,
-                    spaceKey);
+            this.space = rpc.getSpace(spaceKey);            
             setDataReady(true);
         }
         if (!isPagesReady()) {
-            Object[] pages =
-                XWikiRPCHandler.getInstance().getPageSummaries(getConnection().getLoginToken(),
-                    getKey());
-            for (Object page : pages) {
-                HashMap<String, Object> pageSummary = (HashMap<String, Object>) page;
+            Confluence rpc = getConnection().getRpcProxy();
+            String spaceKey = getKey();
+            List<Object> pages = rpc.getPages(spaceKey);
+            for (int i = 0; i<pages.size(); i++) {
+                PageSummary pageSummary = (PageSummary)pages.get(i);
                 IXWikiPage xwikiPage = new XWikiPage(this, pageSummary);
                 addPage(xwikiPage);
             }
@@ -272,27 +278,14 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#addPage(java.lang.String, java.lang.String)
      */
-    public void addPage(String title, String content) throws CommunicationException
+    public void addPage(String title, String content) throws SwizzleConfluenceException
     {
-        HashMap<String, Object> tempPage = new HashMap<String, Object>();
-        HashMap<String, Object> summary = new HashMap<String, Object>();
-        HashMap<String, Object> result;
-        tempPage.put(XWikiConstants.PAGE_SPACE, getKey());
-        tempPage.put(XWikiConstants.PAGE_TITLE, title);
-        tempPage.put(XWikiConstants.PAGE_CONTENT, content);
-        result =
-            (HashMap<String, Object>) XWikiRPCHandler.getInstance().storePage(
-                getConnection().getLoginToken(), tempPage);
-        // Now we need to construct the summary too...
-        summary.put(XWikiConstants.PAGE_SUMMARY_ID, result.get(XWikiConstants.PAGE_ID));
-        summary.put(XWikiConstants.PAGE_SUMMARY_LOCKS, result.get(XWikiConstants.PAGE_LOCKS));
-        summary.put(XWikiConstants.PAGE_SUMMARY_PARENT_ID, result
-            .get(XWikiConstants.PAGE_PARENT_ID));
-        summary.put(XWikiConstants.PAGE_SUMMARY_SPACE, result.get(XWikiConstants.PAGE_SPACE));
-        summary.put(XWikiConstants.PAGE_SUMMARY_TITLE, result.get(XWikiConstants.PAGE_TITLE));
-        summary.put(XWikiConstants.PAGE_SUMMARY_URL, result.get(XWikiConstants.PAGE_URL));
-        // Finally, we add the page into local model...
-        IXWikiPage wikiPage = new XWikiPage(this, summary, result);
+        Page page = new Page();
+        page.setSpace(getKey());
+        page.setTitle(title);
+        page.setContent(content);
+        Page result = getConnection().getRpcProxy().storePage(page);
+        IXWikiPage wikiPage = new XWikiPage(this, result);
         addPage(wikiPage);
     }
 
@@ -313,7 +306,7 @@
      */
     public String getDescriptionAsHtml()
     {
-        return (String) this.data.get(XWikiConstants.SPACE_DESCRIPTION);
+        return (String) this.space.getDescription();
     }
 
     /**
@@ -323,7 +316,7 @@
      */
     public String getHomePageId()
     {
-        return (String) this.data.get(XWikiConstants.SPACE_HOMEPAGE);
+        return (String) this.space.getHomepage();
     }
 
     /**
@@ -333,7 +326,7 @@
      */
     public String getKey()
     {
-        return (String) this.summary.get(XWikiConstants.SPACE_SUMMARY_KEY);
+        return (String) this.summary.getKey();
     }
 
     /**
@@ -343,8 +336,8 @@
      */
     public String getName()
     {
-        // Only space keys are reffered inside XEclipse
-        return (String) this.summary.get(XWikiConstants.SPACE_SUMMARY_KEY);
+        // Only space keys are referred inside XEclipse
+        return (String) this.summary.getName();
     }
 
     /**
@@ -389,7 +382,7 @@
      */
     public String getType()
     {
-        return (String) this.summary.get(XWikiConstants.SPACE_SUMMARY_TYPE);
+        return (String) this.summary.getType();
     }
 
     /**
@@ -399,7 +392,7 @@
      */
     public String getUrl()
     {
-        return (String) this.summary.get(XWikiConstants.SPACE_SUMMARY_URL);
+        return (String) this.summary.getUrl();
     }
 
     /**
@@ -457,14 +450,13 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#removePage(java.lang.String)
      */
-    public void removeChildPage(String pageId) throws CommunicationException
+    public void removeChildPage(String pageId) throws SwizzleConfluenceException
     {
         try {
-            XWikiRPCHandler.getInstance().removePage(getConnection().getLoginToken(), pageId);
+            getConnection().getRpcProxy().removePage(pageId);
             IXWikiPage pageToRemove = getPageByID(pageId);
             pagesByID.remove(pageToRemove.getId());
-          //  pagesByTitle.remove(pageToRemove.getTitle());
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             throw e;
         }
     }
@@ -484,7 +476,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#update()
      */
-    public IXWikiSpace save() throws CommunicationException
+    public IXWikiSpace save() throws SwizzleConfluenceException
     {
         // TODO implement this.
         return null;
@@ -497,7 +489,7 @@
      *      java.lang.String, java.lang.String, int)
      */
     public void updateChildPage(String pageId, String title, String content, int version)
-        throws CommunicationException
+        throws SwizzleConfluenceException
     {
         // TODO implement this.
     }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiPage.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiPage.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiPage.java	(working copy)
@@ -24,8 +24,11 @@
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.util.Date;
-import java.util.HashMap;
 
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.Page;
+import org.codehaus.swizzle.confluence.PageSummary;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.core.resources.IStorage;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -38,8 +41,6 @@
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
 import org.xwiki.plugins.eclipse.model.adapters.TreeAdapter;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiPageWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-import org.xwiki.plugins.eclipse.rpc.impl.XWikiRPCHandler;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiConstants;
 
@@ -57,12 +58,13 @@
     /**
      * Summary of this page.
      */
-    private HashMap<String, Object> summary;
-
+    private PageSummary summary;
+    // TODO Again, like for spaces, why keep a summary when it's all included in the page ? 
+    
     /**
      * Data (opposite of summary ?) of this page.
      */
-    private HashMap<String, Object> data;
+    private Page page;
 
     /**
      * Whether data has been retrieved or not.
@@ -76,9 +78,9 @@
      * @param parent Parent space.
      * @param summary Page summary.
      */
-    protected XWikiPage(IXWikiSpace parent, HashMap<String, Object> summary)
+    protected XWikiPage(IXWikiSpace parent, PageSummary pageSummary)
     {
-        data = new HashMap<String, Object>();
+        page = new Page();
         setSpace(parent);
         setSummary(summary);
     }
@@ -91,23 +93,22 @@
      * @param summary Page summary
      * @param data Page data.
      */
-    protected XWikiPage(IXWikiSpace parent, HashMap<String, Object> summary,
-        HashMap<String, Object> data)
+    protected XWikiPage(IXWikiSpace parent, Page page)
     {
         setSpace(parent);
-        setSummary(summary);
-        this.data = data;
+        setSummary(page);
+        this.page = page;
         setDataReady(true);
     }
 
     /**
      * Used by internal code to set data for this page.
      * 
-     * @param data Page data.
+     * @param page Page data.
      */
-    protected void setData(HashMap<String, Object> data)
+    protected void setPage(Page page)
     {
-        this.data = data;
+        this.page = page;
     }
 
     /**
@@ -135,7 +136,7 @@
      * 
      * @param summary Summary of this page.
      */
-    protected void setSummary(HashMap<String, Object> summary)
+    protected void setSummary(PageSummary summary)
     {
         this.summary = summary;
     }
@@ -323,13 +324,12 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiPage#initialize()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isDataReady()) {
-            String loginToken = getParentSpace().getConnection().getLoginToken();
+            Confluence rpc = getParentSpace().getConnection().getRpcProxy();
             String pageId = getId();
-            Object pageData = XWikiRPCHandler.getInstance().getPage(loginToken, pageId);
-            this.data = (HashMap<String, Object>) pageData;
+            this.page = rpc.getPage(pageId);
             setDataReady(true);
         }
     }
@@ -341,7 +341,7 @@
      */
     public String getContent()
     {
-        return (String) this.data.get(XWikiConstants.PAGE_CONTENT);
+        return (String) this.page.getContent();
     }
 
     /**
@@ -351,7 +351,7 @@
      */
     public String getContentStatus()
     {
-        return (String) this.data.get(XWikiConstants.PAGE_CONTENT_STATUS);
+        return (String) this.page.getContentStatus();
     }
 
     /**
@@ -361,7 +361,7 @@
      */
     public Date getCreated()
     {
-        return (Date) this.data.get(XWikiConstants.PAGE_CREATED);
+        return (Date) this.page.getCreated();
     }
 
     /**
@@ -371,7 +371,7 @@
      */
     public String getCreator()
     {
-        return (String) this.data.get(XWikiConstants.PAGE_CREATOR);
+        return (String) this.page.getCreator();
     }
 
     /**
@@ -381,7 +381,7 @@
      */
     public String getId()
     {
-        return (String) this.summary.get(XWikiConstants.PAGE_SUMMARY_ID);
+        return (String) this.summary.getId();
     }
 
     /**
@@ -391,7 +391,7 @@
      */
     public String getLastModifier()
     {
-        return (String) this.data.get(XWikiConstants.PAGE_MODIFIER);
+        return (String) this.page.getModifier();
     }
 
     /**
@@ -401,7 +401,7 @@
      */
     public int getLocks()
     {
-        return (Integer) this.summary.get(XWikiConstants.PAGE_SUMMARY_LOCKS);
+        return (Integer) this.summary.getLocks();
     }
 
     /**
@@ -411,7 +411,7 @@
      */
     public Date getModified()
     {
-        return (Date) this.data.get(XWikiConstants.PAGE_MODIFIED);
+        return (Date) this.page.getModified();
     }
 
     /**
@@ -421,7 +421,7 @@
      */
     public String getParentId()
     {
-        return (String) this.summary.get(XWikiConstants.PAGE_SUMMARY_PARENT_ID);
+        return (String) this.summary.getParentId();
     }
 
     /**
@@ -441,7 +441,7 @@
      */
     public String getParentSpaceKey()
     {
-        return (String) this.summary.get(XWikiConstants.PAGE_SUMMARY_SPACE);
+        return (String) this.summary.getSpace();
     }
 
     /**
@@ -451,7 +451,7 @@
      */
     public String getTitle()
     {
-        return (String) this.summary.get(XWikiConstants.PAGE_SUMMARY_TITLE);
+        return (String) this.summary.getTitle();
     }
 
     /**
@@ -461,7 +461,7 @@
      */
     public String getUrl()
     {
-        return (String) this.summary.get(XWikiConstants.PAGE_SUMMARY_URL);
+        return (String) this.summary.getUrl();
     }
 
     /**
@@ -471,7 +471,7 @@
      */
     public int getVersion()
     {
-        return (Integer) this.data.get(XWikiConstants.PAGE_VERSION);
+        return (Integer) this.page.getVersion();
     }
 
     /**
@@ -481,7 +481,7 @@
      */
     public boolean isCurrent()
     {
-        return (Boolean) this.data.get(XWikiConstants.PAGE_CURRENT);
+        return (Boolean) this.page.isCurrent();
     }
 
     /**
@@ -501,7 +501,7 @@
      */
     public boolean isHomePage()
     {
-        return (Boolean) this.data.get(XWikiConstants.PAGE_HOMEPAGE);
+        return (Boolean) this.page.isHomePage();
     }
 
     /**
@@ -521,7 +521,7 @@
      */
     public void setContent(String newContent)
     {
-        this.data.put(XWikiConstants.PAGE_CONTENT, newContent);
+        this.page.setContent(newContent);
     }
 
     /**
@@ -531,8 +531,8 @@
      */
     public void setParentId(String newParentId)
     {
-        this.summary.put(XWikiConstants.PAGE_SUMMARY_ID, newParentId);
-        this.data.put(XWikiConstants.PAGE_PARENT_ID, newParentId);
+        this.summary.setParentId(newParentId);
+        this.page.setParentId(newParentId);
     }
 
     /**
@@ -542,8 +542,8 @@
      */
     public void setTitle(String newTitle)
     {
-        this.summary.put(XWikiConstants.PAGE_SUMMARY_TITLE, newTitle);
-        this.data.put(XWikiConstants.PAGE_TITLE, newTitle);
+        this.summary.setTitle(newTitle);
+        this.page.setTitle(newTitle);
     }
 
     /**
@@ -551,13 +551,10 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiPage#update()
      */
-    public IXWikiPage save() throws CommunicationException
+    public IXWikiPage save() throws SwizzleConfluenceException
     {
-        String loginToken = getParentSpace().getConnection().getLoginToken();
-        HashMap<String, Object> newData =
-            (HashMap<String, Object>) XWikiRPCHandler.getInstance().storePage(loginToken,
-                this.data);
-        this.data = newData;
+        Confluence rpc = getParentSpace().getConnection().getRpcProxy();
+        this.page = rpc.storePage(page);
         setDataReady(true);
         return this;
     }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnection.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnection.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/impl/XWikiConnection.java	(working copy)
@@ -24,14 +24,17 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.List;
 
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.Space;
+import org.codehaus.swizzle.confluence.SpaceSummary;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.swt.graphics.Image;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
 import org.xwiki.plugins.eclipse.model.adapters.TreeAdapter;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiConnectionWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-import org.xwiki.plugins.eclipse.rpc.impl.XWikiRPCHandler;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiConstants;
 
@@ -40,11 +43,10 @@
  */
 public class XWikiConnection implements IXWikiConnection, TreeAdapter
 {
-
     /**
-     * Login token as returned by the login rpc call.
+     * An XML-RPC proxy
      */
-    private String loginToken;
+    private Confluence rpc;
 
     /**
      * Username supplied by the user for this connection.
@@ -57,11 +59,6 @@
     private String serverUrl;
 
     /**
-     * Top-level spaces. Mapped by spaceName
-     */
-    private HashMap<String, IXWikiSpace> spacesByName;
-
-    /**
      * Top-level spaces. Mapped by spaceKey
      */
     private HashMap<String, IXWikiSpace> spacesByKey;
@@ -72,11 +69,10 @@
     private boolean spacesReady = false;
 
     /**
-     * Default constructor. A connection should only be aquired by going through ConnectionManager
+     * Default constructor. A connection should only be acquired by going through ConnectionManager
      */
     protected XWikiConnection()
     {
-        spacesByName = new HashMap<String, IXWikiSpace>();
         spacesByKey = new HashMap<String, IXWikiSpace>();
     }
 
@@ -85,9 +81,9 @@
      * 
      * @param loginToken Login token as returned by login() rpc call.
      */
-    protected void setLoginToken(String loginToken)
+    protected void setRpcProxy(Confluence rpc)
     {
-        this.loginToken = loginToken;
+        this.rpc = rpc;
     }
 
     /**
@@ -127,9 +123,6 @@
      */
     protected void addSpace(IXWikiSpace space)
     {
-        // TODO : This is a hack to avoid empty name issues. Sweep out the code ASAP.
-        // i.e. Remove spacesByName and all references to it.
-        spacesByName.put(space.getKey(), space);
         spacesByKey.put(space.getKey(), space);
     }
 
@@ -143,14 +136,14 @@
         IXWikiConnection xwikiConnection = new XWikiConnectionWrapper(this);
         try {
             xwikiConnection.init();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // Will be logged elsewhere.
         }
         if (!spacesReady) {
             return null;
         }
         ArrayList<IXWikiSpace> displaySpaces = new ArrayList<IXWikiSpace>();
-        for (IXWikiSpace s : spacesByName.values()) {
+        for (IXWikiSpace s : spacesByKey.values()) {
             if (!s.isMasked()) {
                 displaySpaces.add(s);
             }
@@ -213,15 +206,15 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#initialize()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isSpacesReady()) {
-            Object[] spaces = XWikiRPCHandler.getInstance().getSpaceSummaries(loginToken);
-            for (Object space : spaces) {
-                HashMap<String, Object> summary = (HashMap<String, Object>) space;
+            List spaceSummaries = rpc.getSpaces();
+            for (int i = 0; i < spaceSummaries.size(); i++){
+                SpaceSummary summary = (SpaceSummary)spaceSummaries.get(i);
                 IXWikiSpace xwikiSpace = new XWikiSpace(this, summary);
                 addSpace(xwikiSpace);
-            }
+            }            
             setSpacesReady(true);
         }
     }
@@ -233,23 +226,21 @@
      *      java.lang.String, java.lang.String)
      */
     public void addSpace(String name, String key, String description)
-        throws CommunicationException
+        throws SwizzleConfluenceException
     {
-        HashMap<String, Object> tempSapce = new HashMap<String, Object>();
-        HashMap<String, Object> summary = new HashMap<String, Object>();
-        HashMap<String, Object> result;
-        tempSapce.put(XWikiConstants.SPACE_KEY, key);
-        tempSapce.put(XWikiConstants.SPACE_NAME, name);
-        tempSapce.put(XWikiConstants.SPACE_DESCRIPTION, description);
-        result =
-            (HashMap<String, Object>) XWikiRPCHandler.getInstance().addSpace(loginToken,
-                tempSapce);
-        summary.put(XWikiConstants.SPACE_SUMMARY_KEY, result.get(XWikiConstants.SPACE_KEY));
-        summary.put(XWikiConstants.SPACE_SUMMARY_NAME, result.get(XWikiConstants.SPACE_NAME));
-        // This is a hack to avoid complexity.
-        summary.put(XWikiConstants.SPACE_SUMMARY_TYPE, "Not Available");
-        summary.put(XWikiConstants.SPACE_SUMMARY_URL, result.get(XWikiConstants.SPACE_URL));
+        Space space = new Space();
+        space.setKey(key);
+        space.setName(name);
+        space.setDescription(description);
+        Space result = rpc.addSpace(space);
+        SpaceSummary summary = new SpaceSummary();
+        summary.setKey(result.getKey());
+        summary.setName(result.getName());
+        summary.setType(result.getType());
+        summary.setUrl(result.getUrl());
+        
         IXWikiSpace wikiSpace = new XWikiSpace(this, summary, result);
+        
         // We need this space to be displayed.
         wikiSpace.setMasked(false);
         // Finally, add the space to local model.
@@ -261,20 +252,20 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#disconnect()
      */
-    public void disconnect() throws CommunicationException
+    public void disconnect() throws SwizzleConfluenceException
     {
-        XWikiRPCHandler.getInstance().logout(loginToken);
-        XWikiConnectionManager.getInstance().removeConnection(loginToken);
+        rpc.logout();
+        XWikiConnectionManager.getInstance().removeConnection(this);
     }
 
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getLoginToken()
+     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getRpcProxy()
      */
-    public String getLoginToken()
+    public Confluence getRpcProxy()
     {
-        return loginToken;
+        return rpc;
     }
 
     /**
@@ -290,20 +281,10 @@
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpaceByName(java.lang.String)
+     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpace(java.lang.String)
      */
-    public IXWikiSpace getSpaceByName(String spaceName)
+    public IXWikiSpace getSpace(String spaceKey)
     {
-        return spacesByName.get(spaceName);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpaceByKey(java.lang.String)
-     */
-    public IXWikiSpace getSpaceByKey(String spaceKey)
-    {
         return spacesByKey.get(spaceKey);
     }
 
@@ -314,7 +295,7 @@
      */
     public Collection<IXWikiSpace> getSpaces()
     {
-        return this.spacesByName.values();
+        return this.spacesByKey.values();
     }
 
     /**
@@ -342,11 +323,9 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#removeSpace(java.lang.String)
      */
-    public void removeSpace(String key) throws CommunicationException
+    public void removeSpace(String key) throws SwizzleConfluenceException
     {
-        IXWikiSpace spaceToBeRemoved = getSpaceByKey(key);
-        XWikiRPCHandler.getInstance().removeSpace(getLoginToken(), key);
-        spacesByName.remove(spaceToBeRemoved.getName());
+        rpc.removeSpace(key);
         spacesByKey.remove(key);
     }
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionManagerWrapper.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionManagerWrapper.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionManagerWrapper.java	(working copy)
@@ -27,7 +27,8 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiConnectionManager;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiProgressRunner;
 
@@ -59,7 +60,7 @@
      *      java.lang.String, java.lang.String, java.lang.String)
      */
     public IXWikiConnection connect(final String serverUrl, final String userName,
-        final String password, final String proxy) throws CommunicationException
+        final String password, final String proxy) throws SwizzleConfluenceException
     {
         XWikiProgressRunner operation = new XWikiProgressRunner()
         {
@@ -76,7 +77,7 @@
                     IXWikiConnection con = manager.connect(serverUrl, userName, password, proxy);
                     setArtifact(con);
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -104,11 +105,11 @@
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnectionManager#removeConnection(java.lang.String)
+     * @see org.xwiki.plugins.eclipse.model.IXWikiConnectionManager#removeConnection(Confluence)
      */
-    public void removeConnection(String loginToken)
+    public void removeConnection(IXWikiConnection connection)
     {
-        manager.removeConnection(loginToken);
+        manager.removeConnection(connection);
     }
 
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiSpaceWrapper.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiSpaceWrapper.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiSpaceWrapper.java	(working copy)
@@ -25,11 +25,11 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiPage;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiProgressRunner;
 
@@ -59,7 +59,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#addPage(java.lang.String, java.lang.String)
      */
-    public void addPage(final String title, final String content) throws CommunicationException
+    public void addPage(final String title, final String content) throws SwizzleConfluenceException
     {
         // It is assumed that at this point it has been verified that the
         // given title is unique. (i.e. no page with same title exists)
@@ -72,7 +72,7 @@
                 try {
                     space.addPage(title, content);
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -105,7 +105,7 @@
         try {
             init();
             return space.getDescriptionAsHtml();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception
             return "";
         }
@@ -121,7 +121,7 @@
         try {
             init();
             return space.getHomePageId();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception
             return "";
         }
@@ -177,7 +177,7 @@
         try {
             init();
             return space.getPages();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception
             return new ArrayList<IXWikiPage>();
         }
@@ -208,7 +208,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#init()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isPagesReady()) {
             XWikiProgressRunner operation = new XWikiProgressRunner()
@@ -220,7 +220,7 @@
                     try {
                         space.init();
                         monitor.done();
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         monitor.done();
                         setComEx(e);
                         throw new InvocationTargetException(e);
@@ -289,7 +289,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#removeChildPage(java.lang.String)
      */
-    public void removeChildPage(final String pageId) throws CommunicationException
+    public void removeChildPage(final String pageId) throws SwizzleConfluenceException
     {
         if (space.getPageByID(pageId) != null) {
             XWikiProgressRunner operation = new XWikiProgressRunner()
@@ -301,7 +301,7 @@
                     try {
                         space.removeChildPage(pageId);
                         monitor.done();
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         monitor.done();
                         setComEx(e);
                         throw new InvocationTargetException(e);
@@ -323,7 +323,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiSpace#save()
      */
-    public IXWikiSpace save() throws CommunicationException
+    public IXWikiSpace save() throws SwizzleConfluenceException
     {
         XWikiProgressRunner operation = new XWikiProgressRunner()
         {
@@ -334,7 +334,7 @@
                 try {
                     space.save();
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -366,7 +366,7 @@
      *      java.lang.String, java.lang.String, int)
      */
     public void updateChildPage(String pageId, String title, String content, int version)
-        throws CommunicationException
+        throws SwizzleConfluenceException
     {
         // TODO Implement this.
 
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiPageWrapper.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiPageWrapper.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiPageWrapper.java	(working copy)
@@ -24,10 +24,10 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.Date;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.xwiki.plugins.eclipse.model.IXWikiPage;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiProgressRunner;
 
@@ -62,7 +62,7 @@
         try {
             init();
             return page.getContent();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return "";
         }
@@ -78,7 +78,7 @@
         try {
             init();
             return page.getContentStatus();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return "";
         }
@@ -94,7 +94,7 @@
         try {
             init();
             return page.getCreated();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return new Date();
         }
@@ -110,7 +110,7 @@
         try {
             init();
             return page.getCreator();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return "";
         }
@@ -136,7 +136,7 @@
         try {
             init();
             return page.getLastModifier();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return "";
         }
@@ -152,7 +152,7 @@
         try {
             init();
             return page.getLocks();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return 0;
         }
@@ -168,7 +168,7 @@
         try {
             init();
             return page.getModified();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return new Date();
         }
@@ -184,7 +184,7 @@
         try {
             init();
             return page.getParentId();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return "";
         }
@@ -240,7 +240,7 @@
         try {
             init();
             return page.getVersion();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return 0;
         }
@@ -251,7 +251,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiPage#init()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isDataReady()) {
             XWikiProgressRunner operation = new XWikiProgressRunner()
@@ -268,7 +268,7 @@
                     try {
                         page.init();
                         monitor.done();
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         monitor.done();
                         setComEx(e);
                         throw new InvocationTargetException(e);
@@ -292,7 +292,7 @@
         try {
             init();
             return page.isCurrent();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return true;
         }
@@ -318,7 +318,7 @@
         try {
             init();
             return page.isHomePage();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception.
             return false;
         }
@@ -339,7 +339,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiPage#save()
      */
-    public IXWikiPage save() throws CommunicationException
+    public IXWikiPage save() throws SwizzleConfluenceException
     {
         XWikiProgressRunner operation = new XWikiProgressRunner()
         {
@@ -355,7 +355,7 @@
                 try {
                     page.save();
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionWrapper.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionWrapper.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/wrappers/XWikiConnectionWrapper.java	(working copy)
@@ -25,10 +25,11 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiProgressRunner;
 
@@ -60,7 +61,7 @@
      *      java.lang.String, java.lang.String)
      */
     public void addSpace(final String name, final String key, final String description)
-        throws CommunicationException
+        throws SwizzleConfluenceException
     {
         // It is assumed that at this point it has been verfied that spaceName
         // and spaceKey are unique.
@@ -73,7 +74,7 @@
                 try {
                     connection.addSpace(name, key, description);
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -91,7 +92,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#disconnect()
      */
-    public void disconnect() throws CommunicationException
+    public void disconnect() throws SwizzleConfluenceException
     {
         XWikiProgressRunner operation = new XWikiProgressRunner()
         {
@@ -107,7 +108,7 @@
                 try {
                     connection.disconnect();
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -120,20 +121,10 @@
         }
 
     }
-
+    
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getLoginToken()
-     */
-    public String getLoginToken()
-    {
-        return connection.getLoginToken();
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getServerUrl()
      */
     public String getServerUrl()
@@ -144,26 +135,16 @@
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpaceByName(java.lang.String)
+     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpace(java.lang.String)
      */
-    public IXWikiSpace getSpaceByName(String spaceName)
+    public IXWikiSpace getSpace(String spaceKey)
     {
-        return connection.getSpaceByName(spaceName);
+        return connection.getSpace(spaceKey);
     }
 
     /**
      * {@inheritDoc}
      * 
-     * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpaceByKey(java.lang.String)
-     */
-    public IXWikiSpace getSpaceByKey(String spaceKey)
-    {
-        return connection.getSpaceByKey(spaceKey);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#getSpaces()
      */
     public Collection<IXWikiSpace> getSpaces()
@@ -171,7 +152,7 @@
         try {
             init();
             return connection.getSpaces();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // TODO log this exception
             return new ArrayList<IXWikiSpace>();
         }
@@ -192,7 +173,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#init()
      */
-    public void init() throws CommunicationException
+    public void init() throws SwizzleConfluenceException
     {
         if (!isSpacesReady()) {
             XWikiProgressRunner operation = new XWikiProgressRunner()
@@ -209,7 +190,7 @@
                     try {
                         connection.init();
                         monitor.done();
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         monitor.done();
                         setComEx(e);
                         throw new InvocationTargetException(e);
@@ -238,7 +219,7 @@
      * 
      * @see org.xwiki.plugins.eclipse.model.IXWikiConnection#removeSpace(java.lang.String)
      */
-    public void removeSpace(final String key) throws CommunicationException
+    public void removeSpace(final String key) throws SwizzleConfluenceException
     {
         XWikiProgressRunner operation = new XWikiProgressRunner()
         {
@@ -254,7 +235,7 @@
                 try {
                     connection.removeSpace(key);
                     monitor.done();
-                } catch (CommunicationException e) {
+                } catch (SwizzleConfluenceException e) {
                     monitor.done();
                     setComEx(e);
                     throw new InvocationTargetException(e);
@@ -266,4 +247,9 @@
             throw operation.getComEx();
         }
     }
+
+    public Confluence getRpcProxy()
+    {
+        return connection.getRpcProxy();
+    }
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnection.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnection.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/model/IXWikiConnection.java	(working copy)
@@ -23,7 +23,8 @@
 
 import java.util.Collection;
 
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
+import org.codehaus.swizzle.confluence.Confluence;
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 
 /**
  * A connection (session...) to a XWiki server.
@@ -36,7 +37,7 @@
      * 
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void init() throws CommunicationException;
+    public void init() throws SwizzleConfluenceException;
 
     /**
      * @return Username.
@@ -49,9 +50,9 @@
     public String getServerUrl();
 
     /**
-     * @return Login token as a String.
+     * @return The XML-RPC proxy used by this connection
      */
-    public String getLoginToken();
+    public Confluence getRpcProxy();
 
     /**
      * Retrieves and returns all available spaces.
@@ -66,19 +67,13 @@
      * 
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void disconnect() throws CommunicationException;
+    public void disconnect() throws SwizzleConfluenceException;
 
     /**
-     * @param spaceName Name of the space.
-     * @return The space with corresponding name or null if no such space exists.
-     */
-    public IXWikiSpace getSpaceByName(String spaceName);
-
-    /**
      * @param spaceKey Key of the space.
      * @return The space with corresponding key or null if no such space exists.
      */
-    public IXWikiSpace getSpaceByKey(String spaceKey);
+    public IXWikiSpace getSpace(String spaceKey);
 
     /**
      * @return True if spaces have been retrieved, otherwise returns false.
@@ -94,7 +89,7 @@
      * @throws CommunicationException - If XMLRPC call fails.
      */
     public void addSpace(String name, String key, String description)
-        throws CommunicationException;
+        throws SwizzleConfluenceException;
 
     /**
      * Removes the specified space from this connection.
@@ -102,5 +97,5 @@
      * @param key Key of the space which is to be removed.
      * @throws CommunicationException - If XMLRPC call fails.
      */
-    public void removeSpace(String key) throws CommunicationException;
+    public void removeSpace(String key) throws SwizzleConfluenceException;
 }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/pages/SpaceSettingsPage.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/pages/SpaceSettingsPage.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/pages/SpaceSettingsPage.java	(working copy)
@@ -106,21 +106,14 @@
      */
     private boolean validatePage()
     {
-        spaceName = ui.getSpaceNameText().getText().trim();
         // spaceKey masked.
         // spaceKey = ui.getSpaceKeyText().getText().trim();
-        spaceKey = spaceName;
+        spaceKey = ui.getSpaceNameText().getText().trim();
         spaceDescription = ui.getSpaceDescriptionText().getText().trim();
-        if (spaceName.equals("")) {
-            setErrorMessage(" Space Name Cannot be Empty.");
-            return false;
-        } else if (connection.getSpaceByName(spaceName) != null) {
-            setErrorMessage(" Space Name Must be Unique.");
-            return false;
-        } else if (spaceKey.equals("")) {
+        if (spaceKey.equals("")) {
             setErrorMessage(" Space Key Cannot be Empty.");
             return false;
-        } else if (connection.getSpaceByKey(spaceKey) != null) {
+        } else if (connection.getSpace(spaceKey) != null) {
             setErrorMessage(" Space Key Must be Unique.");
             return false;
         } else if (spaceDescription.equals("")) {
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/NewSpaceWizard.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/NewSpaceWizard.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newspace/NewSpaceWizard.java	(working copy)
@@ -21,9 +21,9 @@
 
 package org.xwiki.plugins.eclipse.wizards.newspace;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.wizard.Wizard;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.wizards.newspace.pages.SpaceSettingsPage;
 
 /**
@@ -75,7 +75,7 @@
         try {
             connection.addSpace(settingsPage.getSpaceName(), settingsPage.getSpaceKey(),
                 settingsPage.getSpaceDescription());
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // Will be logged elsewhere.
         }
         return true;
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newpage/NewPageWizard.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newpage/NewPageWizard.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/newpage/NewPageWizard.java	(working copy)
@@ -21,9 +21,9 @@
 
 package org.xwiki.plugins.eclipse.wizards.newpage;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.wizard.Wizard;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.wizards.newpage.pages.PageSettingsPage;
 
 /**
@@ -75,7 +75,7 @@
     {
         try {
             space.addPage(settingsPage.getPageTitle(), settingsPage.getPageContent());
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             // Will be logged elsewhere
         }
         return true;
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SpacesPage.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SpacesPage.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SpacesPage.java	(working copy)
@@ -100,27 +100,27 @@
             importSpacesUI.getAvailableSpacesList().removeAll();
             for (String item : items) {
                 importSpacesUI.getSelectedSpacesList().add(item);
-                wizardState.getConnection().getSpaceByName(item).setMasked(false);
+                wizardState.getConnection().getSpace(item).setMasked(false);
             }
         } else if (importSpacesUI.getRemoveAllButton().equals(e.getSource())) {
             String[] items = importSpacesUI.getSelectedSpacesList().getItems();
             importSpacesUI.getSelectedSpacesList().removeAll();
             for (String item : items) {
                 importSpacesUI.getAvailableSpacesList().add(item);
-                wizardState.getConnection().getSpaceByName(item).setMasked(true);
+                wizardState.getConnection().getSpace(item).setMasked(true);
             }
         } else if (importSpacesUI.getAddButton().equals(e.getSource())) {
             String[] selections = importSpacesUI.getAvailableSpacesList().getSelection();
             for (String selection : selections) {
                 importSpacesUI.getSelectedSpacesList().add(selection);
-                wizardState.getConnection().getSpaceByName(selection).setMasked(false);
+                wizardState.getConnection().getSpace(selection).setMasked(false);
                 importSpacesUI.getAvailableSpacesList().remove(selection);
             }
         } else if (importSpacesUI.getRemoveButton().equals(e.getSource())) {
             String[] selections = importSpacesUI.getSelectedSpacesList().getSelection();
             for (String selection : selections) {
                 importSpacesUI.getAvailableSpacesList().add(selection);
-                wizardState.getConnection().getSpaceByName(selection).setMasked(true);
+                wizardState.getConnection().getSpace(selection).setMasked(true);
                 importSpacesUI.getSelectedSpacesList().remove(selection);
             }
         }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SettingsPage.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SettingsPage.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/pages/SettingsPage.java	(working copy)
@@ -21,6 +21,7 @@
 
 package org.xwiki.plugins.eclipse.wizards.connect.pages;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -33,7 +34,6 @@
 import org.xwiki.plugins.eclipse.model.impl.XWikiConnectionManager;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiConnectionManagerWrapper;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiConnectionWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.wizards.XWikiWizardPage;
 import org.xwiki.plugins.eclipse.wizards.connect.WizardState;
 import org.xwiki.plugins.eclipse.wizards.connect.ui.SettingsUI;
@@ -226,7 +226,7 @@
                 connection = manager.connect(serverUrl, userName, password, proxy);
                 wizardState.setConnection(connection);
                 wizardState.setLoggedIn(true);
-            } catch (CommunicationException e) {
+            } catch (SwizzleConfluenceException e) {
                 wizardState.setLoggedIn(false);
                 return;
             }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/ConnectWizard.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/ConnectWizard.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/wizards/connect/ConnectWizard.java	(working copy)
@@ -23,11 +23,11 @@
 
 import java.util.Collection;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.wizard.Wizard;
 import org.xwiki.plugins.eclipse.model.IXWikiConnection;
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiConnectionWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.wizards.connect.pages.SettingsPage;
 import org.xwiki.plugins.eclipse.wizards.connect.pages.SpacesPage;
 
@@ -117,7 +117,7 @@
             IXWikiConnection connection = new XWikiConnectionWrapper(wizardState.getConnection());
             try {
                 connection.disconnect();
-            } catch (CommunicationException e) {
+            } catch (SwizzleConfluenceException e) {
                 // Will be logged else where.
             }
             wizardState.setConnection(null);
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/exceptions/CommunicationException.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/exceptions/CommunicationException.java	(revision 4520)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/exceptions/CommunicationException.java	(working copy)
@@ -1,49 +0,0 @@
-/*
- * Copyright 2006-2007, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- */
-
-package org.xwiki.plugins.eclipse.rpc.exceptions;
-
-/**
- * Default exception thrown by all RPC related activities.
- */
-public class CommunicationException extends Exception
-{
-
-    static final long serialVersionUID = 000001L;
-
-    /**
-     * {@inheritDoc}
-     */
-    public CommunicationException()
-    {
-        super();
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @param message Exception message
-     */
-    public CommunicationException(String message)
-    {
-        super(message);
-    }
-}
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/impl/XWikiRPCHandler.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/impl/XWikiRPCHandler.java	(revision 4520)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/impl/XWikiRPCHandler.java	(working copy)
@@ -1,268 +0,0 @@
-/*
- * Copyright 2006-2007, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- */
-
-package org.xwiki.plugins.eclipse.rpc.impl;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Vector;
-
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-
-/**
- * Default implementation of {@link IXWikiRPCHandler}.
- */
-public class XWikiRPCHandler implements IXWikiRPCHandler
-{
-
-    /**
-     * Shared instance of the RPCHandler.
-     */
-    private static XWikiRPCHandler privateInstance;
-
-    /**
-     * Currently connected clients. (loginToken -> RpcClient)
-     */
-    private HashMap<String, XmlRpcClient> clients;
-
-    /**
-     * Private constructor.
-     */
-    private XWikiRPCHandler()
-    {
-        clients = new HashMap<String, XmlRpcClient>();
-    }
-
-    /**
-     * @return Shared instance as a {@link IXWikiRPCHandler} object.
-     */
-    public static IXWikiRPCHandler getInstance()
-    {
-        if (privateInstance == null) {
-            privateInstance = new XWikiRPCHandler();
-        }
-        return privateInstance;
-    }
-
-    /**
-     * @param loginToken The login token as returned by login() rpc call.
-     * @return Corresponding {@link XmlRpcClient} object.
-     */
-    private XmlRpcClient findClient(String loginToken)
-    {
-        XmlRpcClient client = clients.get(loginToken);
-        if (client == null) {
-            // TODO might need to deal with this, but for now, leaving it out
-        }
-        return client;
-    }
-
-    /**
-     * This is where all the rpc calls pass through.
-     * 
-     * @param rpc Method name which is to be invoked.
-     * @param params All the parameters packed into a vector.
-     * @param client XmlRpcClient on which the call should be made upon.
-     * @return Value returned from server as an Object.
-     * @throws CommunicationException - If some exception occurs.
-     */
-    private Object rpcCall(String rpc, Vector<Object> params, XmlRpcClient client)
-        throws CommunicationException
-    {
-        try {
-            return client.execute("confluence1." + rpc, params);
-        } catch (XmlRpcException e) {
-            throw new CommunicationException(e.getMessage());
-        } catch (Exception e) {
-            throw new CommunicationException(e.getMessage());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#getPage(java.lang.String,
-     *      java.lang.String)
-     */
-    public Object getPage(String loginToken, String pageId) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(pageId);
-        return rpcCall("getPage", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#storePage(java.lang.String,
-     *      java.lang.Object)
-     */
-    public Object storePage(String loginToken, Object page) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(page);
-        return (Object) rpcCall("storePage", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#getPageSummaries(java.lang.String,
-     *      java.lang.String)
-     */
-    public Object[] getPageSummaries(String loginToken, String spaceKey)
-        throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(spaceKey);
-        return (Object[]) rpcCall("getPages", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#removePage(java.lang.String,
-     *      java.lang.String)
-     */
-    public void removePage(String loginToken, String pageId) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(pageId);
-        rpcCall("removePage", params, client);
-        return;
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#getSpace(java.lang.String,
-     *      java.lang.String)
-     */
-    public Object getSpace(String loginToken, String spacekey) throws CommunicationException
-    {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#getSpaceSummaries(java.lang.String)
-     */
-    public Object[] getSpaceSummaries(String loginToken) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        return (Object[]) rpcCall("getSpaces", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#addSpace(java.lang.String,
-     *      java.lang.Object)
-     */
-    public Object addSpace(String loginToken, Object space) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(space);
-        return rpcCall("addSpace", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#removeSpace(java.lang.String,
-     *      java.lang.String)
-     */
-    public void removeSpace(String loginToken, String spaceKey) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        params.add(spaceKey);
-        rpcCall("removeSpace", params, client);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#logout(java.lang.String)
-     */
-    public void logout(String loginToken) throws CommunicationException
-    {
-        XmlRpcClient client = findClient(loginToken);
-        Vector<Object> params = new Vector<Object>();
-        params.add(loginToken);
-        rpcCall("logout", params, client);
-        clients.remove(loginToken);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * @see org.xwiki.plugins.eclipse.rpc.IXWikiRPCHandler#login(java.lang.String, java.lang.String,
-     *      java.lang.String, java.lang.String)
-     */
-    public String login(String serverUrl, String username, String password, String proxy)
-        throws CommunicationException
-    {
-        if (proxy != null) {
-            String[] proxyDetails = proxy.split(":");
-            System.getProperties().put("http.proxyHost", proxyDetails[0]);
-            System.getProperties().put("http.proxyPort", proxyDetails[0]);
-            // System.getProperties().put("proxySet","true");
-        }
-        XmlRpcClient client = new XmlRpcClient();
-        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
-        String loginToken = null;
-        try {
-            config.setServerURL(new URL(serverUrl));
-        } catch (IOException e) {
-            throw new CommunicationException(e.getMessage());
-        }
-        client.setConfig(config);
-        Vector<Object> params = new Vector<Object>();
-        params.add(username);
-        params.add(password);
-        loginToken = (String) rpcCall("login", params, client);
-        if (loginToken == null) {
-            throw new CommunicationException("Unable to obtain a login token from server.");
-        }
-        clients.put(loginToken, client);
-        return loginToken;
-    }
-}
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/IXWikiRPCHandler.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/IXWikiRPCHandler.java	(revision 4520)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/rpc/IXWikiRPCHandler.java	(working copy)
@@ -1,130 +0,0 @@
-/*
- * Copyright 2006-2007, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- */
-
-package org.xwiki.plugins.eclipse.rpc;
-
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
-
-/**
- * Interface for defining RPC handlers.
- */
-public interface IXWikiRPCHandler
-{
-    /**
-     * Creates a session with the given user credentials
-     * 
-     * @param serverUrl XWiki server url (Ex http://somehost/xwiki/xmlrpc/confluence).
-     * @param username User name.
-     * @param password Password.
-     * @param proxy If a proxy is used (Ex http://somehost:someport).
-     * @return Login token as a String
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public String login(String serverUrl, String username, String password, String proxy)
-        throws CommunicationException;
-
-    /**
-     * Retrieves all the space summaries for this session.
-     * 
-     * @param loginToken Session identifier.
-     * @return An array of objects which are of HashMap<String, Object> type.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object[] getSpaceSummaries(String loginToken) throws CommunicationException;
-
-    /**
-     * Retreives the specific space with the given key.
-     * 
-     * @param loginToken Session identifier.
-     * @param spacekey Space identifier.
-     * @return Space which is of HashMap<String, Object> type.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object getSpace(String loginToken, String spacekey) throws CommunicationException;
-
-    /**
-     * Adds a new space into user's workspace.
-     * 
-     * @param loginToken Session identifier.
-     * @param space Space to be created.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object addSpace(String loginToken, Object space) throws CommunicationException;
-
-    /**
-     * Removes the specified space permanently.
-     * 
-     * @param loginToken Session identifier.
-     * @param spaceKey Key of the space which is to be removed.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public void removeSpace(String loginToken, String spaceKey) throws CommunicationException;
-
-    /**
-     * Retrieves summaries of all the pages that belongs to the specified space.
-     * 
-     * @param loginToken Session identifier.
-     * @param spaceKey Space identifier.
-     * @return An Array of objects which are of HashMap<String, Object> type.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object[] getPageSummaries(String loginToken, String spaceKey)
-        throws CommunicationException;
-
-    /**
-     * Returns the specific page with the given Id.
-     * 
-     * @param loginToken Session identifier
-     * @param pageId Page identifier.
-     * @return Page object which is of HashMap<String, Object> type.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object getPage(String loginToken, String pageId) throws CommunicationException;
-
-    /**
-     * Saves a page on the server. It may be an already existing page (an update) or a completely
-     * new one (creation). There are restrictions on which parameters should be provided along with
-     * pages. Those restrictions shall be enforced by upper layers.
-     * 
-     * @param loginToken Session identifier.
-     * @param page Page object which is of HashMap<String, Object> type.
-     * @return New Page which was saved on the server.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public Object storePage(String loginToken, Object page) throws CommunicationException;
-
-    /**
-     * Removes a page from server (should be removed from the local model as well).
-     * 
-     * @param loginToken Session identifier.
-     * @param pageId Id of the page to be removed.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public void removePage(String loginToken, String pageId) throws CommunicationException;
-
-    /**
-     * Logs out the user and destroys all the data structures associated with the session.
-     * 
-     * @param loginToken Session identifier.
-     * @throws CommunicationException - If XMLRPC call fails.
-     */
-    public void logout(String loginToken) throws CommunicationException;
-}
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/editors/XWikiDocumentProvider.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/editors/XWikiDocumentProvider.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/editors/XWikiDocumentProvider.java	(working copy)
@@ -21,6 +21,7 @@
 
 package org.xwiki.plugins.eclipse.editors;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.text.Document;
@@ -28,7 +29,6 @@
 import org.eclipse.ui.editors.text.StorageDocumentProvider;
 import org.xwiki.plugins.eclipse.model.IXWikiPage;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiPageWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 
 /**
  * This class handles the mapping between model's document
@@ -73,7 +73,7 @@
         wikiPage.setContent(document.get());
         try {
             wikiPage.save();
-        } catch (CommunicationException e) {
+        } catch (SwizzleConfluenceException e) {
             wikiPage.setContent(oldContent);
             // TODO might want to throw a Core Exception here.
         }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiConstants.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiConstants.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiConstants.java	(working copy)
@@ -30,70 +30,6 @@
     /* Disable/Enable Progress Information */
     public static boolean PROGRESS_ON = true;
 
-    /* Space Summary */
-    public static String SPACE_SUMMARY_KEY = "key";
-
-    public static String SPACE_SUMMARY_NAME = "name";
-
-    public static String SPACE_SUMMARY_TYPE = "type";
-
-    public static String SPACE_SUMMARY_URL = "url";
-
-    /* Space */
-    public static String SPACE_KEY = "key";
-
-    public static String SPACE_NAME = "name";
-
-    public static String SPACE_URL = "url";
-
-    public static String SPACE_HOMEPAGE = "homepage";
-
-    public static String SPACE_DESCRIPTION = "description";
-
-    /* Page Summary */
-    public static String PAGE_SUMMARY_ID = "id";
-
-    public static String PAGE_SUMMARY_SPACE = "space";
-
-    public static String PAGE_SUMMARY_PARENT_ID = "parentId";
-
-    public static String PAGE_SUMMARY_TITLE = "title";
-
-    public static String PAGE_SUMMARY_URL = "url";
-
-    public static String PAGE_SUMMARY_LOCKS = "locks";
-
-    /* Page */
-    public static String PAGE_ID = "id";
-
-    public static String PAGE_SPACE = "space";
-
-    public static String PAGE_PARENT_ID = "parentId";
-
-    public static String PAGE_TITLE = "title";
-
-    public static String PAGE_URL = "url";
-
-    public static String PAGE_VERSION = "version";
-
-    public static String PAGE_CONTENT = "content";
-
-    public static String PAGE_CREATED = "created";
-
-    public static String PAGE_CREATOR = "creator";
-
-    public static String PAGE_MODIFIED = "modified";
-
-    public static String PAGE_MODIFIER = "modifier";
-
-    public static String PAGE_HOMEPAGE = "homePage";
-
-    public static String PAGE_LOCKS = "locks";
-
-    public static String PAGE_CONTENT_STATUS = "contentStatus";
-
-    public static String PAGE_CURRENT = "current";
-
     /* Icons */
     public static String ADD_CONNECTION_ICON = "icons/add-connection.png";
 
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiProgressRunner.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiProgressRunner.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/util/XWikiProgressRunner.java	(working copy)
@@ -21,8 +21,8 @@
 
 package org.xwiki.plugins.eclipse.util;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 
 /**
  * Customized {@link IRunnableWithProgress} to accomodate
@@ -33,7 +33,7 @@
     /**
      * Place holder for any exceptions thrown while executing the task (RPC).
      */
-    private CommunicationException comEx;
+    private SwizzleConfluenceException comEx;
 
     /**
      * Place holder for any objects returned while executing the task (RPC).
@@ -43,7 +43,7 @@
     /**
      * @return Any {@link CommunicationException} s thrown or null.
      */
-    public CommunicationException getComEx()
+    public SwizzleConfluenceException getComEx()
     {
         return comEx;
     }
@@ -52,7 +52,7 @@
      * @param communicationException Used by the executing task to set any
      *            {@link CommunicationException} s encountered.
      */
-    public void setComEx(CommunicationException communicationException)
+    public void setComEx(SwizzleConfluenceException communicationException)
     {
         this.comEx = communicationException;
     }
Index: plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/views/navigator/XWikiNavigator.java
===================================================================
--- plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/views/navigator/XWikiNavigator.java	(revision 4529)
+++ plugins/org.xwiki.eclipse/src/main/java/org/xwiki/plugins/eclipse/views/navigator/XWikiNavigator.java	(working copy)
@@ -21,6 +21,7 @@
 
 package org.xwiki.plugins.eclipse.views.navigator;
 
+import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
@@ -52,7 +53,6 @@
 import org.xwiki.plugins.eclipse.model.IXWikiSpace;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiConnectionWrapper;
 import org.xwiki.plugins.eclipse.model.wrappers.XWikiSpaceWrapper;
-import org.xwiki.plugins.eclipse.rpc.exceptions.CommunicationException;
 import org.xwiki.plugins.eclipse.util.GuiUtils;
 import org.xwiki.plugins.eclipse.util.XWikiConstants;
 import org.xwiki.plugins.eclipse.wizards.XWikiWizardDialog;
@@ -234,7 +234,7 @@
                         new XWikiConnectionWrapper((IXWikiConnection) obj);
                     try {
                         connection.disconnect();
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         // Will be logged else where.
                     }
                     viewer.refresh();
@@ -286,7 +286,7 @@
                     IXWikiSpace space = new XWikiSpaceWrapper(wikipage.getParentSpace());
                     try {
                         space.removeChildPage(wikipage.getId());
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         // Will be logged else where.
                     }
                     viewer.refresh();
@@ -339,7 +339,7 @@
                         new XWikiConnectionWrapper(space.getConnection());
                     try {
                         connection.removeSpace(space.getKey());
-                    } catch (CommunicationException e) {
+                    } catch (SwizzleConfluenceException e) {
                         // Will be logged elsewhere.
                     }
                     viewer.refresh();
Index: plugins/org.xwiki.eclipse/build.properties
===================================================================
--- plugins/org.xwiki.eclipse/build.properties	(revision 4529)
+++ plugins/org.xwiki.eclipse/build.properties	(working copy)
@@ -3,6 +3,7 @@
 bin.includes = plugin.xml,\
                META-INF/,\
                org.xwiki.plugins.eclipse/,\
+               lib/swizzle-confluence-1.1-20070825-xwiki.jar,\
                lib/ws-commons-util-1.0.1.jar,\
                lib/xmlrpc-client-3.0.jar,\
                lib/xmlrpc-common-3.0.jar,\
