Index: MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java
===================================================================
--- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java	(revision 1529)
+++ MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java	(revision 1530)
@@ -111,4 +111,7 @@
 		}
 		
+	 public String getScanClause() {
+		 return getParam("scanClause");
+	 }
 	 public String getRecordPacking() {
 		 return getParam("recordPacking");
Index: MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/VirtualCollectionProxyAction.java
===================================================================
--- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/VirtualCollectionProxyAction.java	(revision 1529)
+++ MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/VirtualCollectionProxyAction.java	(revision 1530)
@@ -14,4 +14,5 @@
 import eu.clarin.cmdi.mdservice.internal.Admin;
 import eu.clarin.cmdi.mdservice.internal.Cache;
+import eu.clarin.cmdi.mdservice.internal.Helpers;
 import eu.clarin.cmdi.mdservice.internal.MDTransformer;
 
@@ -77,6 +78,6 @@
 		
 		// find the workspace data
-		NodeList list = (NodeList) getWorkspace(); 
-        InputStream is = this.DocumentToStream(list.item(0));
+		NodeList list = (NodeList) getWorkspaceData(); 
+        InputStream is = Helpers.DocumentToStream(list.item(0));
 		//xslt transform to request data
 		MDTransformer transformer = new MDTransformer();
Index: MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java
===================================================================
--- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java	(revision 1529)
+++ MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java	(revision 1530)
@@ -50,4 +50,5 @@
 
 import eu.clarin.cmdi.mdservice.internal.Admin;
+import eu.clarin.cmdi.mdservice.internal.Helpers;
 import eu.clarin.cmdi.mdservice.internal.MDTransformer;
 import eu.clarin.cmdi.mdservice.model.Diagnostic;
@@ -479,5 +480,5 @@
 		String newid = "";
 		if (this.elementtype.equals(WorkspaceAction.SE_WORKSPACE)){
-			NodeList wsnodelist = (NodeList) getWorkspace();
+			NodeList wsnodelist = (NodeList) getWorkspaceData();
 	        // remove 
 	        //childeNode
@@ -581,5 +582,5 @@
 				 	        node2 = workspace_doc.renameNode(node2, "", "item");
 				 	   // apend to specific querysets
-				 	        NodeList wsnodelist = (NodeList) this.getWorkspace();
+				 	        NodeList wsnodelist = (NodeList) this.getWorkspaceData();
 				 	        Element welem = (Element)wsnodelist.item(0);
 							Node anode = welem.getElementsByTagName("Querysets").item(0);
@@ -620,5 +621,5 @@
 				 	        node2 = workspace_doc.renameNode(node2, "", "item");
 				 	   // apend to specific querysets
-				 	        NodeList wsnodelist = (NodeList) this.getWorkspace();
+				 	        NodeList wsnodelist = (NodeList) this.getWorkspaceData();
 				 	        Element welem = (Element)wsnodelist.item(0);
 				 	        Node anode = welem.getElementsByTagName("Bookmarksets").item(0);
@@ -715,20 +716,4 @@
 		
 	}
-	public InputStream DocumentToStream(Node node) throws TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError{
-		
-		InputStream is = null;
-		ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 
-		Source xmlSource;
-		
-		if (node == null) {
-			xmlSource = new DOMSource(workspace_doc); 
-		} else {
-			xmlSource = new DOMSource(node);
-		}
-		Result outputTarget = new StreamResult(outputStream); 
-		TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget); 
-		is = new ByteArrayInputStream(outputStream.toByteArray()); 
-		return is;
-	}
 
 	public String DocumentToXMLString(){
@@ -813,5 +798,5 @@
 		return userstring;
 	}
-	public String getWorkspaceXPathExpression(){
+	public String getWorkspaceDataXPathExpression(){
 		String xpath_expr = "";
 
@@ -821,10 +806,10 @@
 	}
 	
-	public Object getWorkspace() throws XPathExpressionException{
+	public Object getWorkspaceData() throws XPathExpressionException{
 		InputStream is = null;
 		XPathFactory factory = XPathFactory.newInstance(); 
 	    XPath xpath = factory.newXPath(); 
 	    XPathExpression expr;
-			expr = xpath.compile(getWorkspaceXPathExpression());
+			expr = xpath.compile(getWorkspaceDataXPathExpression());
 			//expression is evaluated with respect to a certain context node which is doc.
 			Object result = null;
@@ -975,8 +960,8 @@
 		loadParams();
 		
-	        NodeList list = (NodeList) getWorkspace();//result;
+	        NodeList list = (NodeList) getWorkspaceData();//result;
 	        if (list.getLength() < 1) {
 	        	addWorkspaceToDocument();
-	        	list = (NodeList) getWorkspace();
+	        	list = (NodeList) getWorkspaceData();
 	        }
 	        if (list.getLength() > 1){
@@ -984,5 +969,5 @@
 	        }
 	        // nodelistto stream
-	        InputStream is = this.DocumentToStream(list.item(0));
+	        InputStream is = Helpers.DocumentToStream(list.item(0));
 	        this.setSourceStream(is);     
 		
Index: MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceRepositoryAction.java
===================================================================
--- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceRepositoryAction.java	(revision 1530)
+++ MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceRepositoryAction.java	(revision 1530)
@@ -0,0 +1,79 @@
+package eu.clarin.cmdi.mdservice.action;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import net.sf.json.JSON;
+import net.sf.json.JSONObject;
+import net.sf.json.JSONSerializer;
+import net.sf.json.xml.XMLSerializer;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import eu.clarin.cmdi.mdservice.internal.Admin;
+import eu.clarin.cmdi.mdservice.internal.Cache;
+import eu.clarin.cmdi.mdservice.internal.MDTransformer;
+import eu.clarin.cmdi.mdservice.model.Diagnostic;
+import eu.clarin.cmdi.mdservice.model.WorkspaceProfile;
+
+
+/**
+ *
+ * @author 
+ *
+ */
+public class WorkspaceRepositoryAction extends WorkspaceAction  
+{
+
+	private static final long serialVersionUID = 1L;
+	private static Logger log = Logger.getLogger("WorkspaceRepositoryAction");
+	
+	public String getWorkspaceDataXPathExpression(){
+		String xpath_expr = "";
+
+		xpath_expr = "//Profiles/WorkspaceProfiles/WorkspaceProfile[@user='" + getUserName() + "']/Repositories";
+
+		return xpath_expr;
+	}
+
+
+}
Index: MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/internal/Helpers.java
===================================================================
--- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/internal/Helpers.java	(revision 1529)
+++ MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/internal/Helpers.java	(revision 1530)
@@ -2,4 +2,6 @@
 
 import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -12,4 +14,12 @@
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
@@ -20,4 +30,5 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -164,3 +175,19 @@
 
 
+	public static InputStream DocumentToStream(Node node) throws TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError{
+		
+		InputStream is = null;
+		ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 
+		Source xmlSource;
+		
+		//if (node == null) {
+		//	xmlSource = new DOMSource(workspace_doc); 
+		//} else {
+			xmlSource = new DOMSource(node);
+		//}
+		Result outputTarget = new StreamResult(outputStream); 
+		TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget); 
+		is = new ByteArrayInputStream(outputStream.toByteArray()); 
+		return is;
+	}
 }
Index: MDService2/branches/MDService_simple3/src/struts.xml
===================================================================
--- MDService2/branches/MDService_simple3/src/struts.xml	(revision 1529)
+++ MDService2/branches/MDService_simple3/src/struts.xml	(revision 1530)
@@ -205,4 +205,13 @@
 		</action>
 		
+		<action name="repository" class="eu.clarin.cmdi.mdservice.action.WorkspaceRepositoryAction" method="execute">
+			   <param name="type">server</param> 
+    		    <result type="stream">			   
+			        <!-- <param name="contentType">application/json</param> -->
+			        <param name="contentType">${getActionContentType()}</param>
+			        <param name="inputName">resultStream</param>			        
+			    </result>
+		</action>
+		
 		<action name="virtualcollection/*/*" class="eu.clarin.cmdi.mdservice.action.VirtualCollectionProxyAction" method="publish">		 
 			   <param name="type">{1}</param> 
