diff --git a/doc/BruteXServices_User_Guide.dbk b/doc/BruteXServices_User_Guide.dbk
index 17e2234..b2dd524 100644
--- a/doc/BruteXServices_User_Guide.dbk
+++ b/doc/BruteXServices_User_Guide.dbk
@@ -3789,6 +3789,72 @@
FileServices
The FileServces bundles various file operations. Its WSDL is located at
http://server:port/XServices/FileService?wsdl
+
+
+ downloadFile
+ Downloads a file as base64 encoded.
+ Sample request:
+
+
+
+
+
+
+ FILE
+ c:\temp\test.docx
+
+
+
+
+]]>
+ Sample response:
+
+
+
+
+ ADQBNA[... snipp ...]wAApzcAAAAA
+ test.docx
+
+
+
+]]>
+
+Encoding files as base64 is very memory consuming!
+
+
+ encodeFile
+ Encodes a file as base64.
+ Sample request:
+
+
+
+
+
+ FILE
+ c:\temp\test.docx
+
+
+
+
+]]>
+ Sample response:
+
+
+
+
+ ADQBNA[... snipp ...]wAApzcAAAAA
+ test.docx
+
+
+
+]]>
+
+DEPRECATED: Encoding files as base64 is very memory consuming!
+
MailServices
@@ -3878,6 +3944,45 @@
correctly.
+
+
+ StringServices
+ The StringService bundles various operations. Its WSDL is located at
+ http://server:port/XServices/StringService?wsdl
+
+
+ replaceRegEx
+ Search and Replace using regular expression.
+ Sample request:
+
+
+
+
+ Hallo Welt
+ W.*
+ Brian
+ ig
+
+
+
+]]>
+ Sample response:
+
+
+
+
+ Hallo Brian
+ 1
+
+
+
+]]>
+
+Allowed regexflags are case-insensitive (i) and global search (g).
+
diff --git a/doc/FileServices.xml b/doc/FileServices.xml
index 7f99c82..5560de7 100644
--- a/doc/FileServices.xml
+++ b/doc/FileServices.xml
@@ -5,4 +5,7 @@
FileServices
The FileServces bundles various file operations. Its WSDL is located at
http://server:port/XServices/FileService?wsdl
+
+
+
\ No newline at end of file
diff --git a/doc/FileServices/downloadFile.xml b/doc/FileServices/downloadFile.xml
new file mode 100644
index 0000000..5133753
--- /dev/null
+++ b/doc/FileServices/downloadFile.xml
@@ -0,0 +1,39 @@
+
+
+%myent;
+]>
+
+ downloadFile
+ Downloads a file as base64 encoded.
+ Sample request:
+
+
+
+
+
+
+ FILE
+ c:\temp\test.docx
+
+
+
+
+]]>
+ Sample response:
+
+
+
+
+ ADQBNA[... snipp ...]wAApzcAAAAA
+ test.docx
+
+
+
+]]>
+
+Encoding files as base64 is very memory consuming!
+
\ No newline at end of file
diff --git a/doc/FileServices/encodeFile.xml b/doc/FileServices/encodeFile.xml
new file mode 100644
index 0000000..788ec3d
--- /dev/null
+++ b/doc/FileServices/encodeFile.xml
@@ -0,0 +1,38 @@
+
+
+%myent;
+]>
+
+ encodeFile
+ Encodes a file as base64.
+ Sample request:
+
+
+
+
+
+ FILE
+ c:\temp\test.docx
+
+
+
+
+]]>
+ Sample response:
+
+
+
+
+ ADQBNA[... snipp ...]wAApzcAAAAA
+ test.docx
+
+
+
+]]>
+
+DEPRECATED: Encoding files as base64 is very memory consuming!
+
\ No newline at end of file
diff --git a/src/java/cache.ccf b/src/java/cache.ccf
new file mode 100644
index 0000000..9e3cf98
--- /dev/null
+++ b/src/java/cache.ccf
@@ -0,0 +1,38 @@
+# DEFAULT CACHE REGION
+jcs.default=DC
+jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes.MaxObjects=1000
+jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.UseMemoryShrinker=false
+jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
+jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
+jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
+jcs.default.elementattributes.IsEternal=false
+jcs.default.elementattributes.MaxLifeSeconds=21600
+jcs.default.elementattributes.IdleTime=1800
+jcs.default.elementattributes.IsSpool=true
+jcs.default.elementattributes.IsRemote=true
+jcs.default.elementattributes.IsLateral=true
+
+# PRE-DEFINED CACHE REGIONS
+jcs.region.FileCache=DC
+jcs.region.FileCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+jcs.region.FileCache.cacheattributes.MaxObjects=1000
+jcs.region.FileCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
+jcs.region.FileCache.cacheattributes.UseMemoryShrinker=false
+jcs.region.FileCache.cacheattributes.MaxMemoryIdleTimeSeconds=3600
+jcs.region.FileCache.cacheattributes.ShrinkerIntervalSeconds=60
+jcs.region.FileCache.cacheattributes.MaxSpoolPerRun=500
+jcs.region.FileCache.elementattributes=org.apache.jcs.engine.ElementAttributes
+jcs.region.FileCache.elementattributes.IsEternal=false
+
+
+# AVAILABLE AUXILIARY CACHES
+jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC.attributes.DiskPath=${user.dir}/jcs_swap
+jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
+jcs.auxiliary.DC.attributes.MaxKeySize=1000000
+jcs.auxiliary.DC.attributes.MaxRecycleBinSize=5000
+jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
+jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60
\ No newline at end of file
diff --git a/src/java/net/brutex/xservices/agent/AgentServlet.java b/src/java/net/brutex/xservices/agent/AgentServlet.java
deleted file mode 100644
index a053b12..0000000
--- a/src/java/net/brutex/xservices/agent/AgentServlet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package net.brutex.xservices.agent;
-
-import java.io.IOException;
-import javax.servlet.GenericServlet;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-/**
- * Servlet implementation class AgentServlet
- */
-public class AgentServlet extends GenericServlet {
- private static final long serialVersionUID = 1L;
-
- /**
- * @see GenericServlet#GenericServlet()
- */
- public AgentServlet() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see Servlet#init(ServletConfig)
- */
- public void init(ServletConfig config) throws ServletException {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see Servlet#service(ServletRequest request, ServletResponse response)
- */
- public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- System.out.println("Yep. I am here.");
- }
-
-}
diff --git a/src/java/net/brutex/xservices/types/FileInfoListType.java b/src/java/net/brutex/xservices/types/FileInfoListType.java
new file mode 100644
index 0000000..0235430
--- /dev/null
+++ b/src/java/net/brutex/xservices/types/FileInfoListType.java
@@ -0,0 +1,47 @@
+package net.brutex.xservices.types;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class FileInfoListType {
+
+ private List list = new ArrayList();
+
+ public void setDirectory(File dir, final boolean withDirectories, final boolean withFiles, int depth) {
+ if(depth <=0) return;
+
+ File[] files = dir.listFiles(new FileFilter() {
+
+ public boolean accept(File pathname) {
+ if(!withFiles && !pathname.isFile()) return false;
+ return true;
+ }
+ });
+ if(files==null) return;
+ for( File e : files) {
+ if(e.isDirectory()) setDirectory(e, withDirectories, withFiles, depth-1);
+ if( (withDirectories && e.isDirectory())
+ || withFiles && e.isFile()) {
+ this.list.add(new FileInfoType(e));
+ }
+ }
+ }
+
+ public void setDirectory(String dir, final boolean withDirectories, final boolean withFiles, int depth) {
+ setDirectory( (new File(dir)), withDirectories, withFiles, depth);
+ }
+
+
+
+ @XmlElement(name="FileInfoList")
+ public List getFiles() {
+ return list;
+ }
+
+}
diff --git a/src/java/net/brutex/xservices/types/FileInfoType.java b/src/java/net/brutex/xservices/types/FileInfoType.java
new file mode 100644
index 0000000..79b4139
--- /dev/null
+++ b/src/java/net/brutex/xservices/types/FileInfoType.java
@@ -0,0 +1,91 @@
+package net.brutex.xservices.types;
+
+import java.io.File;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement
+public class FileInfoType {
+
+ private String name;
+ private String path;
+ private long filesize;
+ private boolean canWrite;
+ private boolean isDirectory;
+
+ public FileInfoType() {
+ }
+
+ public FileInfoType(File file) {
+ this.name = file.getName();
+ this.path = file.getAbsolutePath().replace('\\', '/');
+ this.canWrite = file.canWrite();
+ this.filesize = file.length();
+ this.isDirectory = file.isDirectory(); }
+
+ /**
+ * @return the name
+ */
+ @XmlElement(name="name")
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the path
+ */
+ @XmlElement(name="path")
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * @param path the path to set
+ */
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * @return the filesize
+ */
+ @XmlElement(name="size")
+ public long getFilesize() {
+ return filesize;
+ }
+
+ /**
+ * @param filesize the filesize to set
+ */
+ public void setFilesize(long filesize) {
+ this.filesize = filesize;
+ }
+
+ /**
+ * @return the canWrite
+ */
+ @XmlElement(name="isWritable")
+ public boolean isCanWrite() {
+ return canWrite;
+ }
+
+ /**
+ * @return the isDirectory
+ */
+ @XmlElement(name="isDirectory")
+ public boolean isDirectory() {
+ return isDirectory;
+ }
+
+
+
+}
diff --git a/src/java/net/brutex/xservices/util/XServicesDocumentation.java b/src/java/net/brutex/xservices/util/XServicesDocumentation.java
index 60d957b..c4236ed 100644
--- a/src/java/net/brutex/xservices/util/XServicesDocumentation.java
+++ b/src/java/net/brutex/xservices/util/XServicesDocumentation.java
@@ -48,6 +48,8 @@ public class XServicesDocumentation {
"as inline base64 encoded block. Keep in mind that unless you are using MTOM, a lot of " +
"java heap memory is used.";
+ public static final String SERVICE_OPERATION_ENCODEFILE = "Encodes a file.";
+
public static final String SERVICE_OPERATION_UPLOADFILE = "Send a file from client to web service server using either " +
"MTOM attachment or base64 inline attachment.";
diff --git a/src/java/net/brutex/xservices/ws/FileService.java b/src/java/net/brutex/xservices/ws/FileService.java
index a75a12b..d4cd67b 100644
--- a/src/java/net/brutex/xservices/ws/FileService.java
+++ b/src/java/net/brutex/xservices/ws/FileService.java
@@ -51,6 +51,7 @@ public interface FileService {
final String OPERATION_BASENAME ="basename";
final String OPERATION_DOWNLOADFILE ="downloadFile";
+ final String OPERATION_ENCODEFILE= "encodeFile";
final String OPERATION_UPLOADFILE ="uploadFile";
final String OPERATION_COPY ="copy";
final String OPERATION_COPYFILE ="copyFile";
@@ -89,6 +90,16 @@ public interface FileService {
public abstract AttachmentType downloadFile(
@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
+ /**
+ * @param res
+ * @return Encodes a file
+ * @throws XServicesFault
+ */
+ @WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_ENCODEFILE)
+ @WebMethod(operationName = OPERATION_ENCODEFILE)
+ public abstract byte[] encodeFile(
+ @WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
+
/**
* @param file
* @return The file name of the file that has been uploaded.
diff --git a/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java b/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java
index ada0944..15cf470 100644
--- a/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java
+++ b/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java
@@ -15,6 +15,7 @@
*/
package net.brutex.xservices.ws.impl;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -155,6 +156,26 @@ public class FileServiceImpl implements FileService {
throw new XServicesFault(e);
}
}
+
+ public byte[] encodeFile(FileResource res) throws XServicesFault {
+ InputStream is = null;
+ try {
+ is = res.getAntResource(null).getInputStream();
+
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+
+ int nRead;
+ byte[] data = new byte[4096];
+ while ((nRead = is.read(data, 0, data.length)) != -1) {
+ buffer.write(data, 0, nRead);
+ }
+ buffer.flush();
+ return buffer.toByteArray();
+
+ } catch (IOException e) {
+ throw new XServicesFault(e);
+ }
+ }
/*
* (non-Javadoc)
diff --git a/src/java/net/brutex/xservices/ws/rs/FileInfo.java b/src/java/net/brutex/xservices/ws/rs/FileInfo.java
new file mode 100644
index 0000000..ce7c111
--- /dev/null
+++ b/src/java/net/brutex/xservices/ws/rs/FileInfo.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2012 Brian Rosenberger (Brutex Network)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.brutex.xservices.ws.rs;
+
+import java.util.List;
+
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+
+import net.brutex.xservices.types.FileInfoType;
+
+
+
+@Path("/FileService/")
+@Produces ("application/xml")
+public interface FileInfo {
+
+/**
+ * @param dir
+ * @param withDir
+ * @param withFiles
+ * @param depth
+ * @param search
+ * @param count
+ * @param page
+ * @return List of File
+ */
+@GET
+@Path("getFiles/")
+public Response getFiles(@Context HttpHeaders h,
+ @QueryParam("directory") String dir,
+ @QueryParam("includeDirectories") @DefaultValue("0") boolean withDir,
+ @QueryParam("includeFiles") @DefaultValue("1") boolean withFiles,
+ @QueryParam("depth") @DefaultValue("1") int depth,
+ @QueryParam("search") String search,
+ @QueryParam("itemsPerPage") @DefaultValue("50") int count,
+ @QueryParam("page") @DefaultValue("1") int page);
+
+}
+
+
+
diff --git a/src/java/net/brutex/xservices/ws/rs/FileInfoImpl.java b/src/java/net/brutex/xservices/ws/rs/FileInfoImpl.java
new file mode 100644
index 0000000..07cda73
--- /dev/null
+++ b/src/java/net/brutex/xservices/ws/rs/FileInfoImpl.java
@@ -0,0 +1,92 @@
+package net.brutex.xservices.ws.rs;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+
+import org.apache.jcs.JCS;
+import org.apache.jcs.access.exception.CacheException;
+
+import net.brutex.xservices.types.FileInfoType;
+
+/**
+ * @author Brian Rosenberger
+ *
+ */
+public class FileInfoImpl implements FileInfo {
+
+ public Response getFiles(HttpHeaders h, String dir, boolean withDir,
+ boolean withFiles, int level, String search, int count, int page) {
+
+ System.out.println("Listing directory: " + dir);
+ if(level <= 0) level = 1;
+ if(level > 3) level = 3;
+ if(!withDir && !withFiles) withFiles = true;
+ String cachekey = level +"||"+ withFiles +"||"+ withDir +"||" + search + "||" + dir;
+ try {
+ JCS jcs = JCS.getInstance("FileCache");
+
+ List list = (List) jcs.get(cachekey);
+ if(list == null) {
+ list = setDirectory(dir, withDir, withFiles, level, search);
+ jcs.put(cachekey, list);
+ System.out.println("Stored in Cache: " + list.toString());
+ } else {
+ System.out.println("Got from Cache: " + list.toString());
+ }
+
+
+ int fromIndex = 0;
+ int toIndex = 0;
+ fromIndex = (page-1) * count;
+ toIndex = (page*count);
+ if(toIndex>list.size()) toIndex = list.size();
+ if(fromIndex>toIndex) fromIndex=toIndex;
+ GenericEntity> sublist = new GenericEntity>(list.subList(fromIndex, toIndex) ){};
+ return Response.ok( sublist ).build();
+ } catch (CacheException e) {
+ Response.serverError().build();
+ }
+ return null;
+ }
+
+
+
+ private void setDirectory(List list, File dir, final boolean withDirectories, final boolean withFiles, final int depth, final String search) {
+ if(depth <=0) return;
+
+ File[] files = dir.listFiles(new FileFilter() {
+
+ public boolean accept(File pathname) {
+ if(pathname.isDirectory() && depth > 1) return true;
+ if(search == null || search.equals("")) return true;
+ if(!pathname.getAbsolutePath().contains(search)) return false;
+ return true;
+ }
+ });
+ if(dir.getParentFile() != null && withDirectories==true) list.add(new FileInfoType(dir.getParentFile()));
+ if(files==null) return;
+
+ for( File e : files) {
+ if(e.isDirectory()) setDirectory(list, e, withDirectories, withFiles, depth-1, search);
+ if( (withDirectories && e.isDirectory())
+ || (withFiles && e.isFile()) ) {
+ list.add(new FileInfoType(e));
+ }
+ }
+ }
+
+ private List setDirectory(String dir, final boolean withDirectories, final boolean withFiles, int depth, String search) {
+ List list = new ArrayList();
+ setDirectory( list, (new File(dir)), withDirectories, withFiles, depth, search);
+ return list;
+ }
+
+
+
+}
diff --git a/src/java/net/brutex/xservices/ws/rs/FileListType.java b/src/java/net/brutex/xservices/ws/rs/FileListType.java
new file mode 100644
index 0000000..b7986e8
--- /dev/null
+++ b/src/java/net/brutex/xservices/ws/rs/FileListType.java
@@ -0,0 +1,18 @@
+package net.brutex.xservices.ws.rs;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name="FileList")
+public class FileListType {
+
+ @XmlElement
+ public String name;
+
+ public FileListType(){};
+ public FileListType(String name) {
+ this.name = name;
+ }
+
+}
diff --git a/test/FileRest-soapui-project.xml b/test/FileRest-soapui-project.xml
new file mode 100644
index 0000000..802cd6a
--- /dev/null
+++ b/test/FileRest-soapui-project.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/test/FileService-soapui-project.xml b/test/FileService-soapui-project.xml
index c132338..082b1e6 100644
--- a/test/FileService-soapui-project.xml
+++ b/test/FileService-soapui-project.xml
@@ -1,5 +1,5 @@
-http://localhost:8080/XServices/FileService?wsdl
+http://localhost:8080/XServices/FileService?wsdl
/*
* Copyright 2010 Brian Rosenberger (Brutex Network)
*
@@ -14,635 +14,671 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Download a file from the maschine where the service is running in order to process it with the client. The file is either downloaded as a MTOM attachment or as inline base64 encoded block. Keep in mind that unless you are using MTOM, a lot of java heap memory is used.
-
-
-
-
-
- Replaces every <regex pattern> with a string in an ascii file
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Write or append a string to a file
-
-
-
-
-
- Send a file from client to web service server using either MTOM attachment or base64 inline attachment.
-
-
-
-
-
- Replaces every <pattern> with a string in an ascii file
-
-
-
-
-
- Copies a fileset locally on the server.
-
-
-
-
-
- Replaces every <pattern> with a string in an ascii file
-
-
-
-
-
- Load the content of a resource
-
-
-
-
-
- The base name of the given file excluding the suffix.
-
-
-
-
- Load the content of a resource
-
-
-
-
-
- Copies a single file locally on the server
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Download a file from the maschine where the service is running in order to process it with the client. The file is either downloaded as a MTOM attachment or as inline base64 encoded block. Keep in mind that unless you are using MTOM, a lot of java heap memory is used.
+
+
+
+
+
+ Encodes a file.
+
+
+
+
+
+ Replaces every <regex pattern> with a string in an ascii file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Write or append a string to a file
+
+
+
+
+
+ Send a file from client to web service server using either MTOM attachment or base64 inline attachment.
+
+
+
+
+
+ Replaces every <pattern> with a string in an ascii file
+
+
+
+
+
+ Copies a fileset locally on the server.
+
+
+
+
+
+ Replaces every <pattern> with a string in an ascii file
+
+
+
+
+
+ Load the content of a resource
+
+
+
+
+
+ The base name of the given file excluding the suffix.
+
+
+
+
+ Load the content of a resource
+
+
+
+
+
+ Copies a single file locally on the server
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
]]>http://schemas.xmlsoap.org/wsdl/http://localhost:8080/XServices/FileServiceUTF-8http://localhost:8080/XServices/FileService
@@ -791,7 +827,7 @@
FILE
- c:\temp\test.docx
+ c:/temp/test.docx
@@ -800,10 +836,10 @@
Here is some text with german umlauts (äöü).
- c:/temp/somefile.txt
-
+
+ c:/temp/somefile.txt
utf-8
- false
+ hallo
]]>UTF-8http://localhost:8080/XServices/FileService
@@ -887,4 +923,15 @@
-]]>
\ No newline at end of file
+]]>UTF-8http://localhost:8080/XServices/FileService
+
+
+
+
+
+ FILE
+ c:\temp\test.docx
+
+
+
+]]>
\ No newline at end of file
diff --git a/test/FileServiceMTOM-soapui-project.xml b/test/FileServiceMTOM-soapui-project.xml
index 51bdfcb..40b9d22 100644
--- a/test/FileServiceMTOM-soapui-project.xml
+++ b/test/FileServiceMTOM-soapui-project.xml
@@ -1,5 +1,5 @@
-http://localhost:8080/XServices/FileServiceMTOM?wsdl
+http://localhost:8080/XServices/FileServiceMTOM?wsdl
diff --git a/test/StoreService-soapui-project.xml b/test/StoreService-soapui-project.xml
index 0ce5c0f..9796c54 100644
--- a/test/StoreService-soapui-project.xml
+++ b/test/StoreService-soapui-project.xml
@@ -1,192 +1,192 @@
-http://localhost:8080/XServices/StorageServices?wsdl
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Store text based data
-
-
-
-
-
- Store binary data
-
-
-
-
-
- Deliver a collection to a target node (asynchronous).
-
-
-
-
-
- Create a new Collection by name.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+http://localhost:8080/XServices/StorageServices?wsdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Store text based data
+
+
+
+
+
+ Store binary data
+
+
+
+
+
+ Deliver a collection to a target node (asynchronous).
+
+
+
+
+
+ Create a new Collection by name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
]]>http://schemas.xmlsoap.org/wsdl/http://localhost:8080/XServices/StorageServicesUTF-8http://localhost:8080/XServices/StorageServices
@@ -228,19 +228,19 @@
?
-]]>UTF-8http://localhost:8080/XServices/StorageServices
-
-
-
-
-
- ?
-
-
-
- ?
-
- ?
-
-
+]]>UTF-8http://localhost:8080/XServices/StorageServices
+
+
+
+
+
+ ?
+
+
+
+ ?
+
+ ?
+
+
]]>
\ No newline at end of file
diff --git a/web/WEB-INF/cxf-beans.xml b/web/WEB-INF/cxf-beans.xml
index c67f820..1c884ea 100644
--- a/web/WEB-INF/cxf-beans.xml
+++ b/web/WEB-INF/cxf-beans.xml
@@ -71,4 +71,12 @@
+
+
+
+
+
+
+
+
diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml
index 0ed7bff..7c3c143 100644
--- a/web/WEB-INF/web.xml
+++ b/web/WEB-INF/web.xml
@@ -52,19 +52,4 @@
index.html
-
-
- AgentServlet
- AgentServlet
- net.brutex.xservices.agent.AgentServlet
-
- Port to listen on
- port
- 1313
-
-
-
- AgentServlet
- /AgentServlet
-
\ No newline at end of file