Further tidy up

git-svn-id: https://brutex.net/svn/xservices/trunk@65 e7e49efb-446e-492e-b9ec-fcafc1997a86
tag-20130205r
Brian Rosenberger 2011-05-20 17:38:12 +00:00
parent 1474ad8589
commit a7187e2cca
10 changed files with 1281 additions and 240 deletions

View File

@ -38,6 +38,8 @@ import org.apache.tools.ant.types.resources.URLResource;
public class FileResource public class FileResource
implements ResourceInterface { implements ResourceInterface {
public static final String XML_NAME = "file";
/** /**
* File resource type. * File resource type.
*/ */

View File

@ -34,6 +34,7 @@ import org.apache.tools.ant.types.ZipFileSet;
propOrder = {"type", "source", "filter", "excludes", "casesensitive"}) propOrder = {"type", "source", "filter", "excludes", "casesensitive"})
public class FileSetResource implements ResourceSetInterface { public class FileSetResource implements ResourceSetInterface {
public static final String XML_NAME = "fileset";
/** /**
* Type of FileSet * Type of FileSet
*/ */

View File

@ -73,17 +73,16 @@ public class RunTask {
antproject.addOrReplaceTarget(anttarget); antproject.addOrReplaceTarget(anttarget);
} }
public ReturnCode postTask() { /**
* @return ReturnCode type {@link ReturnCode}
* @throws BuildException
*/
public ReturnCode postTask() throws BuildException {
int returnCode = 0; int returnCode = 0;
Map<String, String> origMap = new HashMap<String, String>(); Map<String, String> origMap = new HashMap<String, String>();
Map<String, String> newMap = null; Map<String, String> newMap = null;
origMap.putAll(antproject.getProperties()); origMap.putAll(antproject.getProperties());
try {
antproject.executeTarget(anttarget.getName()); antproject.executeTarget(anttarget.getName());
} catch (BuildException ex) {
err.print(ex.getMessage());
returnCode = 1;
}
newMap = antproject.getProperties(); newMap = antproject.getProperties();
newMap.putAll(antproject.getUserProperties()); newMap.putAll(antproject.getUserProperties());

View File

@ -61,5 +61,11 @@ public class XServicesDocumentation {
public static final String SERVICE_OPERATION_ECHOTOFILE = "Write or append a string to a file"; public static final String SERVICE_OPERATION_ECHOTOFILE = "Write or append a string to a file";
public static final String SERVICE_OPERATION_REPLACEINFILE = "Replaces every <pattern> with a string in an ascii file";
public static final String SERVICE_OPERATION_REPLACEINFILE2 = "Replaces every <pattern> with a string in an ascii file";
public static final String SERVICE_OPERATION_REPLACEINFILEREGEX = "Replaces every <regex pattern> with a string in an ascii file";
private XServicesDocumentation() {}; private XServicesDocumentation() {};
} }

View File

@ -49,66 +49,155 @@ public interface ArchiveService {
public static final String WS_PARAM_DESTDIR = "destdir"; public static final String WS_PARAM_DESTDIR = "destdir";
public static final String WS_PARAM_ENCODING = "encoding"; public static final String WS_PARAM_ENCODING = "encoding";
public static final String WS_PARAM_OVERWRITE = "overwrite"; public static final String WS_PARAM_OVERWRITE = "overwrite";
public static final String WS_PARAM_COMPRESS = "compresslevel";
/**
* @param src
* @param file
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2) @WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src, public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file); @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
/**
* @param src
* @param file
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE) @WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src, public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file); @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
/**
* @param src
* @param file
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP) @WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src, public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file); @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
/**
* @param src
* @param file
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE) @WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src, public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file); @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
/**
* @param src
* @param dest
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP) @WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP)
public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src, public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest); @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
/**
* @param src
* @param dest
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = WS_OPERATION_BUNZIP2) @WebMethod(operationName = WS_OPERATION_BUNZIP2)
public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src, public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest); @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
/**
* @param src
* @param dest
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "gunzipFromURL") @WebMethod(operationName = "gunzipFromURL")
public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src, public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest); @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
/**
* @param src
* @param dest
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "bunzip2FromURL") @WebMethod(operationName = "bunzip2FromURL")
public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src, public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest); @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
/**
* @param src
* @param file
* @param overwrite
* @param encoding
* @param level
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "zip") @WebMethod(operationName = "zip")
public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src, public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file, @WebParam(name = WS_PARAM_DESTFILE) String file,
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite, @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
@WebParam(name = WS_PARAM_ENCODING) String encoding, @WebParam(name = WS_PARAM_ENCODING) String encoding,
@WebParam(name = "compresslevel") int level); @WebParam(name = WS_PARAM_COMPRESS) int level) throws XServicesFault;
/**
* @param src
* @param file
* @param update
* @param encoding
* @param level
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "zipFromArchive") @WebMethod(operationName = "zipFromArchive")
public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src, public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file, @WebParam(name = WS_PARAM_DESTFILE) String file,
@WebParam(name = WS_PARAM_OVERWRITE) boolean update, @WebParam(name = WS_PARAM_OVERWRITE) boolean update,
@WebParam(name = WS_PARAM_ENCODING) String encoding, @WebParam(name = WS_PARAM_ENCODING) String encoding,
@WebParam(name = "compresslevel") int level); @WebParam(name = "compresslevel") int level) throws XServicesFault;
/**
* @param src
* @param dest
* @param overwrite
* @param encoding
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "unzip") @WebMethod(operationName = "unzip")
public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src, public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest, @WebParam(name = WS_PARAM_DESTDIR) String dest,
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite, @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
@WebParam(name = WS_PARAM_ENCODING) String encoding); @WebParam(name = WS_PARAM_ENCODING) String encoding) throws XServicesFault;
/**
* @param src
* @param dest
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "unrar") @WebMethod(operationName = "unrar")
public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src, public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest); @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
/**
* @param src
* @param dest
* @param overwrite
* @param compression
* @return
* @throws XServicesFault
*/
@WebMethod(operationName = "untar") @WebMethod(operationName = "untar")
public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src, public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
@WebParam(name = WS_PARAM_DESTDIR) String dest, @WebParam(name = WS_PARAM_DESTDIR) String dest,
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite, @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
@WebParam(name = "compression") CompressionType compression); @WebParam(name = "compression") CompressionType compression) throws XServicesFault;
} }

View File

@ -8,37 +8,76 @@ import net.brutex.xservices.types.HostConnection;
import net.brutex.xservices.types.ReturnCode; import net.brutex.xservices.types.ReturnCode;
import net.brutex.xservices.util.BrutexNamespaces; import net.brutex.xservices.util.BrutexNamespaces;
/**
* @author brosenberger
*
*/
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES) @WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
public interface ExecuteService { public interface ExecuteService {
/**
* @param cmd
* @param args
* @param timeout
* @return
*/
@WebMethod(operationName = "runCommand") @WebMethod(operationName = "runCommand")
public abstract ReturnCode runCommand( public abstract ReturnCode runCommand(
@WebParam(name = "executable") String cmd, @WebParam(name = "executable") String cmd,
@WebParam(name = "argline") String args, @WebParam(name = "argline") String args,
@WebParam(name = "timeout") long timeout); @WebParam(name = "timeout") long timeout);
/**
* @param cmd
* @param args
* @param timeout
* @return
*/
@WebMethod(operationName = "runCommandWithArgs") @WebMethod(operationName = "runCommandWithArgs")
public abstract ReturnCode runCommandWithArgs( public abstract ReturnCode runCommandWithArgs(
@WebParam(name = "executable") String cmd, @WebParam(name = "executable") String cmd,
@WebParam(name = "arg") String[] args, @WebParam(name = "arg") String[] args,
@WebParam(name = "timeout") long timeout); @WebParam(name = "timeout") long timeout);
/**
* @param cmd
* @param args
* @return
*/
@WebMethod(operationName = "runCommandAsync") @WebMethod(operationName = "runCommandAsync")
public abstract ReturnCode runCommandAsync( public abstract ReturnCode runCommandAsync(
@WebParam(name = "executable") String cmd, @WebParam(name = "executable") String cmd,
@WebParam(name = "argline") String args); @WebParam(name = "argline") String args);
/**
* @param cmd
* @param args
* @return
*/
@WebMethod(operationName = "runCommandAsyncWithArgs") @WebMethod(operationName = "runCommandAsyncWithArgs")
public abstract ReturnCode runCommandAsyncWithArgs( public abstract ReturnCode runCommandAsyncWithArgs(
@WebParam(name = "executable") String cmd, @WebParam(name = "executable") String cmd,
@WebParam(name = "arg") String[] args); @WebParam(name = "arg") String[] args);
/**
* @param host
* @param cmd
* @param timeout
* @return
*/
@WebMethod(operationName = "runCommandWithSSH") @WebMethod(operationName = "runCommandWithSSH")
public abstract ReturnCode runCommandWithSSH( public abstract ReturnCode runCommandWithSSH(
@WebParam(name = "host") HostConnection host, @WebParam(name = "host") HostConnection host,
@WebParam(name = "command") String cmd, @WebParam(name = "command") String cmd,
@WebParam(name = "timeout") long timeout); @WebParam(name = "timeout") long timeout);
/**
* @param host
* @param keyfile
* @param cmd
* @param timeout
* @return
*/
@WebMethod(operationName = "runCommandWithSSHKeyAuth") @WebMethod(operationName = "runCommandWithSSHKeyAuth")
public abstract ReturnCode runCommandWithSSHKeyAuth( public abstract ReturnCode runCommandWithSSHKeyAuth(
@WebParam(name = "host") HostConnection host, @WebParam(name = "host") HostConnection host,
@ -46,12 +85,26 @@ public interface ExecuteService {
@WebParam(name = "command") String cmd, @WebParam(name = "command") String cmd,
@WebParam(name = "timeout") long timeout); @WebParam(name = "timeout") long timeout);
/**
* @param host
* @param cmd
* @param timeout
* @return
*/
@WebMethod(operationName = "rExec") @WebMethod(operationName = "rExec")
public abstract ReturnCode rExec( public abstract ReturnCode rExec(
@WebParam(name = "host") HostConnection host, @WebParam(name = "host") HostConnection host,
@WebParam(name = "command") String cmd, @WebParam(name = "command") String cmd,
@WebParam(name = "timeout") long timeout); @WebParam(name = "timeout") long timeout);
/**
* @param host
* @param prompt
* @param cmd
* @param expect
* @param timeout
* @return
*/
@WebMethod(operationName = "telnet") @WebMethod(operationName = "telnet")
public abstract ReturnCode runTelnet( public abstract ReturnCode runTelnet(
@WebParam(name = "host") HostConnection host, @WebParam(name = "host") HostConnection host,

View File

@ -48,13 +48,28 @@ import net.brutex.xservices.util.XServicesDocumentation;
) )
public interface FileService { public interface FileService {
public static final String OPERATION_BASENAME ="basename";
public static final String OPERATION_DOWNLOADFILE ="downloadFile";
public static final String OPERATION_UPLOADFILE ="uploadFile";
public static final String OPERATION_COPY ="copy";
public static final String OPERATION_COPYFILE ="copyFile";
public static final String OPERATION_LOADRESOURCE = "loadResource";
public static final String OPERATION_LOADRESOURCEFROMARCHIVE = "loadResourceFromArchive";
public static final String OPERATION_ECHOTOFILE = "echoToFile";
public static final String OPERATION_CHANGEOWNER = "changeOwner";
public static final String OPERATION_CHANGEMODE = "changeMode";
public static final String OPERATION_CHANGEGROUP = "changeGroup";
public static final String OPERATION_REPLACEINFILE = "replaceInFile";
public static final String OPERATION_REPLACEINFILE2 = "replaceInFile2";
public static final String OPERATION_REPLACEINFILEREGEX = "replaceInFileRegEx";
/** /**
* @param filename * @param filename
* @param suffix * @param suffix
* @return The base name of the given file excluding the suffix. * @return The base name of the given file excluding the suffix.
*/ */
@WSDLDocumentation(value = "The base name of the given file excluding the suffix.") @WSDLDocumentation(value = "The base name of the given file excluding the suffix.")
@WebMethod(operationName = "basename") @WebMethod(operationName = OPERATION_BASENAME)
public abstract String basename( public abstract String basename(
@WebParam(name = "file") @XmlElement(required=true) String filename, @WebParam(name = "file") @XmlElement(required=true) String filename,
@WebParam(name = "suffix") String suffix); @WebParam(name = "suffix") String suffix);
@ -62,20 +77,22 @@ public interface FileService {
/** /**
* @param res * @param res
* @return The file itself (MTOM attachment or inline base64) including some file metadata. * @return The file itself (MTOM attachment or inline base64) including some file metadata.
* @throws XServicesFault
*/ */
@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_DOWNLOADFILE) @WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_DOWNLOADFILE)
@WebMethod(operationName = "downloadFile") @WebMethod(operationName = OPERATION_DOWNLOADFILE)
public abstract AttachmentType downloadFile( public abstract AttachmentType downloadFile(
@WebParam(name = "file") FileResource res); @WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
/** /**
* @param file * @param file
* @return The file name of the file that has been uploaded. * @return The file name of the file that has been uploaded.
* @throws XServicesFault
*/ */
@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE) @WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE)
@WebMethod(operationName = "uploadFile") @WebMethod(operationName = OPERATION_UPLOADFILE)
public abstract String uploadFile( public abstract String uploadFile(
@WebParam(name = "file") AttachmentType file); @WebParam(name = "file") AttachmentType file) throws XServicesFault;
/** /**
* @param src * @param src
@ -87,9 +104,9 @@ public interface FileService {
* @throws XServicesFault * @throws XServicesFault
*/ */
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPY) @WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPY)
@WebMethod(operationName = "copy") @WebMethod(operationName = OPERATION_COPY)
public abstract ReturnCode copy( public abstract ReturnCode copy(
@WebParam(name = "fileset") @XmlElement(required=true) FileSetResource src, @WebParam(name = FileSetResource.XML_NAME) @XmlElement(required=true) FileSetResource src,
@WebParam(name = "todir") @XmlElement(required=true) String todir, @WebParam(name = "todir") @XmlElement(required=true) String todir,
@WebParam(name = "preservelastmodified") boolean plm, @WebParam(name = "preservelastmodified") boolean plm,
@WebParam(name = "overwrite") boolean overwrite, @WebParam(name = "overwrite") boolean overwrite,
@ -103,7 +120,7 @@ public interface FileService {
* @throws XServicesFault * @throws XServicesFault
*/ */
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPYFILE) @WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPYFILE)
@WebMethod(operationName = "copyFile") @WebMethod(operationName = OPERATION_COPYFILE)
public abstract ReturnCode copyFile( public abstract ReturnCode copyFile(
@WebParam(name = "fromFile") @XmlElement(required=true) String fromFile, @WebParam(name = "fromFile") @XmlElement(required=true) String fromFile,
@WebParam(name = "toFile") @XmlElement(required=true) String tofile, @WebParam(name = "toFile") @XmlElement(required=true) String tofile,
@ -113,23 +130,25 @@ public interface FileService {
* @param res * @param res
* @param encoding * @param encoding
* @return content of the resource * @return content of the resource
* @throws XServicesFault
*/ */
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCE) @WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCE)
@WebMethod(operationName = "loadResource") @WebMethod(operationName = OPERATION_LOADRESOURCE)
public abstract String loadRes( public abstract String loadRes(
@WebParam(name = "resource") FileResource res, @WebParam(name = FileResource.XML_NAME) FileResource res,
@WebParam(name = "encoding") String encoding); @WebParam(name = "encoding") String encoding) throws XServicesFault;
/** /**
* @param res * @param res
* @param encoding * @param encoding
* @return content of the resource * @return content of the resource
* @throws XServicesFault
*/ */
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCEFROMARCHIVE) @WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCEFROMARCHIVE)
@WebMethod(operationName = "loadResourceFromArchive") @WebMethod(operationName = OPERATION_LOADRESOURCEFROMARCHIVE)
public abstract String loadResFromArchive( public abstract String loadResFromArchive(
@WebParam(name = "archiveresource") ArchiveResource res, @WebParam(name = "archiveresource") ArchiveResource res,
@WebParam(name = "encoding") String encoding); @WebParam(name = "encoding") String encoding) throws XServicesFault;
/** /**
* @param message * @param message
@ -137,45 +156,85 @@ public interface FileService {
* @param encoding * @param encoding
* @param append * @param append
* @return * @return
* @throws XServicesFault
*/ */
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_ECHOTOFILE) @WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_ECHOTOFILE)
@WebMethod(operationName = "echoToFile") @WebMethod(operationName = OPERATION_ECHOTOFILE)
public abstract ReturnCode echo2file( public abstract ReturnCode echo2file(
@WebParam(name = "message") @XmlElement(required=true) String message, @WebParam(name = "message") @XmlElement(required=true) String message,
@WebParam(name = "file") @XmlElement(required=true) String file, @WebParam(name = "file") @XmlElement(required=true) String file,
@WebParam(name = "encoding") String encoding, @WebParam(name = "encoding") String encoding,
@WebParam(name = "append") boolean append); @WebParam(name = "append") boolean append) throws XServicesFault;
@WebMethod(operationName = "changeOwner") /**
* @param res
* @param owner
* @return
*/
@WebMethod(operationName = OPERATION_CHANGEOWNER)
public abstract ReturnCode changeOwner( public abstract ReturnCode changeOwner(
@WebParam(name = "fileset") FileSetResource res, @WebParam(name = FileSetResource.XML_NAME) FileSetResource res,
@WebParam(name = "owner") @XmlElement(required=true) String owner); @WebParam(name = "owner") @XmlElement(required=true) String owner);
@WebMethod(operationName = "changeGroup") /**
* @param res
* @param group
* @return
*/
@WebMethod(operationName = OPERATION_CHANGEGROUP)
public abstract ReturnCode changeGroup( public abstract ReturnCode changeGroup(
@WebParam(name = "fileset") FileSetResource res, @WebParam(name = FileSetResource.XML_NAME) FileSetResource res,
@WebParam(name = "group") @XmlElement(required=true) String group); @WebParam(name = "group") @XmlElement(required=true) String group);
@WebMethod(operationName = "changeMode") /**
* @param res
* @param perm
* @return
*/
@WebMethod(operationName = OPERATION_CHANGEMODE)
public abstract ReturnCode changeMode( public abstract ReturnCode changeMode(
@WebParam(name = "fileset") FileSetResource res, @WebParam(name = FileSetResource.XML_NAME) FileSetResource res,
@WebParam(name = "permissions") @XmlElement(required=true) String perm); @WebParam(name = "permissions") @XmlElement(required=true) String perm);
@WebMethod(operationName = "replaceInFile") /**
* @param res
* @param search
* @param replace
* @return
* @throws XServicesFault
*/
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILE)
@WebMethod(operationName = OPERATION_REPLACEINFILE)
public abstract ReturnCode replaceInFile( public abstract ReturnCode replaceInFile(
@WebParam(name = "file") @XmlElement(required=true) FileResource res, @WebParam(name = FileResource.XML_NAME) @XmlElement(required=true) FileResource res,
@WebParam(name = "search") @XmlElement(required=true) String search, @WebParam(name = "search") @XmlElement(required=true) String search,
@WebParam(name = "replace") @XmlElement(required=true) String replace); @WebParam(name = "replace") @XmlElement(required=true) String replace) throws XServicesFault;
@WebMethod(operationName = "replaceInFile2") /**
* @param res
* @param patternList
* @return
* @throws XServicesFault
*/
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILE2)
@WebMethod(operationName = OPERATION_REPLACEINFILE2)
public abstract ReturnCode replaceInFile2( public abstract ReturnCode replaceInFile2(
@WebParam(name = "file") FileResource res, @WebParam(name = FileResource.XML_NAME) FileResource res,
@WebParam(name = "patternList") List<ReplacePattern> patternList); @WebParam(name = "patternList") List<ReplacePattern> patternList) throws XServicesFault;
@WebMethod(operationName = "replaceInFileRegEx") /**
* @param res
* @param search
* @param replace
* @param flags
* @return
* @throws XServicesFault
*/
@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILEREGEX)
@WebMethod(operationName = OPERATION_REPLACEINFILEREGEX)
public abstract ReturnCode replaceInFileRegEx( public abstract ReturnCode replaceInFileRegEx(
@WebParam(name = "file") FileResource res, @WebParam(name = FileResource.XML_NAME) FileResource res,
@WebParam(name = "search") String search, @WebParam(name = "search") String search,
@WebParam(name = "replace") String replace, @WebParam(name = "replace") String replace,
@WebParam(name = "flags") String flags); @WebParam(name = "flags") String flags) throws XServicesFault;
} }

View File

@ -18,14 +18,20 @@ package net.brutex.xservices.ws;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar; import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.ws.WebFault;
import net.brutex.xservices.util.BrutexNamespaces;
/** /**
* *
* @author Brian Rosenberger, bru@brutex.de * @author Brian Rosenberger, bru@brutex.de
*/ */
@WebFault(targetNamespace=BrutexNamespaces.WS_XSERVICES)
public class XServicesFault extends Exception { public class XServicesFault extends Exception {
/** /**
@ -58,15 +64,34 @@ public class XServicesFault extends Exception {
} }
@XmlElement(name="faultstring") /**
* The error message.
*/
@XmlElement(name="faultstring", namespace=BrutexNamespaces.WS_XSERVICES)
public String faultstring = ""; public String faultstring = "";
@XmlElement(name="username") /**
* Username under which the web service has been executed.
*/
@XmlElement(name="username", namespace=BrutexNamespaces.WS_XSERVICES)
public String username = System.getProperty("user.name"); public String username = System.getProperty("user.name");
@XmlElement(name="homedir") /**
* Home directory of the user profile running the web service.
*/
@XmlElement(name="homedir", namespace=BrutexNamespaces.WS_XSERVICES)
public String homedir = System.getProperty("user.home"); public String homedir = System.getProperty("user.home");
@XmlElement(name="timstamp")
/**
* Timestamp when the fault was thrown.
*/
@XmlElement(name="timstamp", namespace=BrutexNamespaces.WS_XSERVICES)
public XMLGregorianCalendar timestamp = null; public XMLGregorianCalendar timestamp = null;
/**
* Java runtime version.
*/
@XmlElement(name="jvmversion")
public String jvmruntime = System.getProperty("java.version");
} }

View File

@ -15,15 +15,11 @@
*/ */
package net.brutex.xservices.ws.impl; package net.brutex.xservices.ws.impl;
import java.io.BufferedInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.activation.DataHandler; import javax.activation.DataHandler;
@ -31,21 +27,17 @@ import javax.jws.WebMethod;
import javax.jws.WebParam; import javax.jws.WebParam;
import javax.jws.WebService; import javax.jws.WebService;
import net.brutex.xservices.types.AntProperty;
import net.brutex.xservices.types.ArchiveResource; import net.brutex.xservices.types.ArchiveResource;
import net.brutex.xservices.types.AttachmentType; import net.brutex.xservices.types.AttachmentType;
import net.brutex.xservices.types.FileResource; import net.brutex.xservices.types.FileResource;
import net.brutex.xservices.types.FileSetResource; import net.brutex.xservices.types.FileSetResource;
import net.brutex.xservices.types.ReplacePattern; import net.brutex.xservices.types.ReplacePattern;
import net.brutex.xservices.types.ResourceInterface;
import net.brutex.xservices.types.ReturnCode; import net.brutex.xservices.types.ReturnCode;
import net.brutex.xservices.util.BrutexNamespaces; import net.brutex.xservices.util.BrutexNamespaces;
import net.brutex.xservices.util.RunTask; import net.brutex.xservices.util.RunTask;
import net.brutex.xservices.ws.FileService; import net.brutex.xservices.ws.FileService;
import net.brutex.xservices.ws.XServicesFault; import net.brutex.xservices.ws.XServicesFault;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.Base64InputStream;
import org.apache.cxf.aegis.type.mtom.StreamDataSource; import org.apache.cxf.aegis.type.mtom.StreamDataSource;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Basename; import org.apache.tools.ant.taskdefs.Basename;
@ -58,8 +50,6 @@ import org.apache.tools.ant.taskdefs.optional.ReplaceRegExp;
import org.apache.tools.ant.taskdefs.optional.unix.Chgrp; import org.apache.tools.ant.taskdefs.optional.unix.Chgrp;
import org.apache.tools.ant.taskdefs.optional.unix.Chown; import org.apache.tools.ant.taskdefs.optional.unix.Chown;
import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Resource;
import org.apache.tools.ant.types.ResourceCollection;
/** /**
* *
@ -75,9 +65,7 @@ public class FileServiceImpl implements FileService {
* java.lang.String) * java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "basename") public String basename(String filename, String suffix) {
public String basename(@WebParam(name = "file") String filename,
@WebParam(name = "suffix") String suffix) {
final String BASENAME_VALUE = "basename.value"; final String BASENAME_VALUE = "basename.value";
Basename basename = new Basename(); Basename basename = new Basename();
RunTask runner = new RunTask(basename); RunTask runner = new RunTask(basename);
@ -85,16 +73,13 @@ public class FileServiceImpl implements FileService {
if (suffix != null && !suffix.equals("")) { if (suffix != null && !suffix.equals("")) {
basename.setSuffix(suffix); basename.setSuffix(suffix);
} }
basename.setProperty("BASENAME_VALUE"); basename.setProperty(BASENAME_VALUE);
ReturnCode r = runner.postTask(); ReturnCode r = runner.postTask();
return r.getProperty("BASENAME_VALUE"); return r.getProperty(BASENAME_VALUE);
} }
@WebMethod(operationName = "replaceInFile") public ReturnCode replaceInFile(FileResource res, String search,
public ReturnCode replaceInFile( String replace) throws XServicesFault {
@WebParam(name = "file") FileResource res,
@WebParam(name = "search") String search,
@WebParam(name = "replace") String replace) {
ReturnCode r = null; ReturnCode r = null;
Replace rep = new Replace(); Replace rep = new Replace();
rep.setTaskName("Replace"); rep.setTaskName("Replace");
@ -102,14 +87,16 @@ public class FileServiceImpl implements FileService {
rep.addConfigured(res.getAntResource(rep.getProject())); rep.addConfigured(res.getAntResource(rep.getProject()));
rep.setToken(search); rep.setToken(search);
rep.setValue(replace); rep.setValue(replace);
try {
r = runner.postTask(); r = runner.postTask();
} catch (BuildException e) {
throw new XServicesFault(e);
}
return r; return r;
} }
@WebMethod(operationName = "replaceInFile2") public ReturnCode replaceInFile2(FileResource res,
public ReturnCode replaceInFile2( List<ReplacePattern> patternList) throws XServicesFault {
@WebParam(name = "file") FileResource res,
@WebParam(name = "patternList") List<ReplacePattern> patternList) {
ReturnCode r = null; ReturnCode r = null;
for (ReplacePattern pat : patternList) { for (ReplacePattern pat : patternList) {
Replace rep = new Replace(); Replace rep = new Replace();
@ -118,17 +105,17 @@ public class FileServiceImpl implements FileService {
rep.addConfigured(res.getAntResource(rep.getProject())); rep.addConfigured(res.getAntResource(rep.getProject()));
rep.setToken(pat.search); rep.setToken(pat.search);
rep.setValue(pat.replace); rep.setValue(pat.replace);
try {
r = runner.postTask(); r = runner.postTask();
} catch (BuildException e) {
throw new XServicesFault(e);
}
} }
return r; return r;
} }
@WebMethod(operationName = "replaceInFileRegEx") public ReturnCode replaceInFileRegEx(FileResource res, String search,
public ReturnCode replaceInFileRegEx( String replace, String flags) throws XServicesFault {
@WebParam(name = "file") FileResource res,
@WebParam(name = "search") String search,
@WebParam(name = "replace") String replace,
@WebParam(name = "flags") String flags) {
ReplaceRegExp rep = new ReplaceRegExp(); ReplaceRegExp rep = new ReplaceRegExp();
rep.setTaskName("ReplaceRegExp"); rep.setTaskName("ReplaceRegExp");
RunTask runner = new RunTask(rep); RunTask runner = new RunTask(rep);
@ -137,10 +124,13 @@ public class FileServiceImpl implements FileService {
rep.setMatch(search); rep.setMatch(search);
rep.setReplace(replace); rep.setReplace(replace);
rep.setFlags(flags); rep.setFlags(flags);
try {
ReturnCode r = runner.postTask(); ReturnCode r = runner.postTask();
return r; return r;
} catch (BuildException e) {
throw new XServicesFault(e);
}
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
@ -150,21 +140,20 @@ public class FileServiceImpl implements FileService {
* .types.FileSetResource) * .types.FileSetResource)
*/ */
@Override @Override
@WebMethod(operationName = "downloadFile") public AttachmentType downloadFile(FileResource res) throws XServicesFault {
public AttachmentType downloadFile(@WebParam(name = "file") FileResource res) {
InputStream is = null; InputStream is = null;
try { try {
is = res.getAntResource(null).getInputStream(); is = res.getAntResource(null).getInputStream();
} catch (IOException e) { StreamDataSource ssource = new StreamDataSource(
// TODO Auto-generated catch block "application/binary", is);
e.printStackTrace(); DataHandler h = new DataHandler(ssource);
}
DataHandler h = new DataHandler(new StreamDataSource(
"application/binary", is));
AttachmentType t = new AttachmentType(); AttachmentType t = new AttachmentType();
t.setContent(h); t.setContent(h);
t.setFilename(res.getAntResource(null).getName()); t.setFilename(res.getAntResource(null).getName());
return t; return t;
} catch (IOException e) {
throw new XServicesFault(e);
}
} }
/* /*
@ -175,28 +164,19 @@ public class FileServiceImpl implements FileService {
* .types.AttachmentType) * .types.AttachmentType)
*/ */
@Override @Override
@WebMethod(operationName = "uploadFile") public String uploadFile(AttachmentType file) throws XServicesFault {
public String uploadFile(@WebParam(name = "file") AttachmentType file) {
DataHandler h = file.getContent(); DataHandler h = file.getContent();
File f = new File(file.getFilename()); File f = new File(file.getFilename());
FileOutputStream fout; FileOutputStream fout;
try { try {
fout = new FileOutputStream(f); fout = new FileOutputStream(f);
/*
* InputStream in = h.getInputStream();
int b;
while( (b=in.read())!= -1 ) {
fout.write(b);
}
*/
h.writeTo(fout); h.writeTo(fout);
fout.flush(); fout.flush();
fout.close(); fout.close();
//in.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
throw new BuildException(e); throw new XServicesFault(e);
} catch (IOException e) { } catch (IOException e) {
throw new BuildException(e); throw new XServicesFault(e);
} }
return file.getFilename(); return file.getFilename();
} }
@ -209,24 +189,39 @@ public class FileServiceImpl implements FileService {
* .FileSetResource, java.lang.String, boolean, boolean, java.lang.String) * .FileSetResource, java.lang.String, boolean, boolean, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "copy") public ReturnCode copy(FileSetResource src, String todir, boolean plm,
public ReturnCode copy(@WebParam(name = "fileset") FileSetResource src, boolean overwrite, String encoding) throws XServicesFault {
@WebParam(name = "todir") String todir, Copy copy = new Copy();
@WebParam(name = "preservelastmodified") boolean plm, copy.setTaskName("Copy");
@WebParam(name = "overwrite") boolean overwrite, RunTask runner = new RunTask(copy);
@WebParam(name = "encoding") String encoding) throws XServicesFault { FileSet set = src.getAntResource(copy.getProject());
return copy(src, new File(todir), plm, overwrite, encoding); copy.add(set);
File dst = new File(todir);
if (dst.isDirectory()) {
copy.setTodir(dst);
}
if (dst.isFile()) {
copy.setTofile(dst);
}
copy.setOverwrite(overwrite);
copy.setPreserveLastModified(plm);
if (encoding != null && !encoding.equals("")) {
copy.setOutputEncoding(encoding);
} else {
copy.setOutputEncoding(System.getProperty("file.encoding"));
}
return runner.postTask();
} }
@Override @Override
public ReturnCode copyFile(String fromFile, public ReturnCode copyFile(String fromFile, String tofile, boolean overwrite)
String tofile, throws XServicesFault {
boolean overwrite) throws XServicesFault {
Copy copy = new Copy(); Copy copy = new Copy();
copy.setTaskName("Copy"); copy.setTaskName("Copy");
RunTask runner = new RunTask(copy); RunTask runner = new RunTask(copy);
File f = new File(fromFile); File f = new File(fromFile);
if( ! f.isFile() ) throw new XServicesFault("File '"+fromFile+"' not found."); if (!f.isFile())
throw new XServicesFault("File '" + fromFile + "' not found.");
copy.setFile(new File(fromFile)); copy.setFile(new File(fromFile));
copy.setTofile(new File(tofile)); copy.setTofile(new File(tofile));
copy.setOverwrite(overwrite); copy.setOverwrite(overwrite);
@ -241,9 +236,8 @@ public class FileServiceImpl implements FileService {
* .types.FileResource, java.lang.String) * .types.FileResource, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "loadResource") public String loadRes(FileResource res, String encoding)
public String loadRes(@WebParam(name = "resource") FileResource res, throws XServicesFault {
@WebParam(name = "encoding") String encoding) {
if (encoding == null || encoding.equals("")) { if (encoding == null || encoding.equals("")) {
encoding = System.getProperty("file.encoding"); encoding = System.getProperty("file.encoding");
} }
@ -266,10 +260,7 @@ public class FileServiceImpl implements FileService {
* .xservices.types.ArchiveResource, java.lang.String) * .xservices.types.ArchiveResource, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "loadResourceFromArchive") public String loadResFromArchive(ArchiveResource res, String encoding) {
public String loadResFromArchive(
@WebParam(name = "archiveresource") ArchiveResource res,
@WebParam(name = "encoding") String encoding) {
if (encoding == null || encoding.equals("")) { if (encoding == null || encoding.equals("")) {
encoding = System.getProperty("file.encoding"); encoding = System.getProperty("file.encoding");
} }
@ -292,12 +283,30 @@ public class FileServiceImpl implements FileService {
* java.lang.String, java.lang.String, boolean) * java.lang.String, java.lang.String, boolean)
*/ */
@Override @Override
@WebMethod(operationName = "echoToFile") public ReturnCode echo2file(String message, String file, String encoding,
public ReturnCode echo2file(@WebParam(name = "message") String message, boolean append) throws XServicesFault {
@WebParam(name = "file") String file,
@WebParam(name = "encoding") String encoding, Echo echo = new Echo();
@WebParam(name = "append") boolean append) { echo.setTaskName("toFile");
return echo(message, new File(file), encoding, append); RunTask runTask = new RunTask(echo);
echo.addText(message);
echo.setEncoding(encoding);
File f = new File(file);
try {
if (!f.canWrite())
throw new XServicesFault("Cannot write to file: "
+ f.getCanonicalPath());
echo.setFile(f);
echo.setAppend(append);
ReturnCode c = runTask.postTask();
return c;
} catch (BuildException e) {
throw new XServicesFault("Error in echo2file.", e);
} catch (IOException e) {
throw new XServicesFault("Cannot write to file.", e);
}
} }
/* /*
@ -308,11 +317,15 @@ public class FileServiceImpl implements FileService {
* .types.FileSetResource, java.lang.String) * .types.FileSetResource, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "changeOwner") public ReturnCode changeOwner(FileSetResource res, String owner) {
public ReturnCode changeOwner( Chown chown = new Chown();
@WebParam(name = "fileset") FileSetResource res, chown.setTaskName("Chown");
@WebParam(name = "owner") String owner) { RunTask runner = new RunTask(chown);
return chown(res, owner); chown.setOwner(owner);
FileSet set = res.getAntResource(chown.getProject());
chown.add(set);
chown.setMaxParallel(300);
return runner.postTask();
} }
/* /*
@ -323,11 +336,15 @@ public class FileServiceImpl implements FileService {
* .types.FileSetResource, java.lang.String) * .types.FileSetResource, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "changeGroup") public ReturnCode changeGroup(FileSetResource res, String group) {
public ReturnCode changeGroup( Chgrp chgrp = new Chgrp();
@WebParam(name = "fileset") FileSetResource res, chgrp.setTaskName("Chgrp");
@WebParam(name = "group") String group) { RunTask runner = new RunTask(chgrp);
return chgrp(res, group); chgrp.setGroup(group);
FileSet set = res.getAntResource(chgrp.getProject());
chgrp.add(set);
chgrp.setMaxParallel(300);
return runner.postTask();
} }
/* /*
@ -338,82 +355,11 @@ public class FileServiceImpl implements FileService {
* .types.FileSetResource, java.lang.String) * .types.FileSetResource, java.lang.String)
*/ */
@Override @Override
@WebMethod(operationName = "changeMode") public ReturnCode changeMode(FileSetResource res, String perm) {
public ReturnCode changeMode(
@WebParam(name = "fileset") FileSetResource res,
@WebParam(name = "permissions") String perm) {
return chmod(res, perm);
}
@WebMethod(exclude = true)
private ReturnCode echo(String msg, File file, String encoding,
boolean append) {
Echo echo = new Echo();
echo.setTaskName("toFile");
RunTask runTask = new RunTask(echo);
echo.addText(msg);
echo.setEncoding(encoding);
echo.setFile(file);
echo.setAppend(append);
return runTask.postTask();
}
@WebMethod(exclude = true)
private ReturnCode copy(FileSetResource src, File dst,
boolean preservelastmodified, boolean overwrite, String encoding) {
Copy copy = new Copy();
copy.setTaskName("Copy");
RunTask runner = new RunTask(copy);
FileSet set = src.getAntResource(copy.getProject());
copy.add(set);
if (dst.isDirectory()) {
copy.setTodir(dst);
}
if (dst.isFile()) {
copy.setTofile(dst);
}
copy.setOverwrite(overwrite);
copy.setPreserveLastModified(preservelastmodified);
if (encoding != null && !encoding.equals("")) {
copy.setOutputEncoding(encoding);
} else {
copy.setOutputEncoding(System.getProperty("file.encoding"));
}
return runner.postTask();
}
@WebMethod(exclude = true)
private ReturnCode chown(FileSetResource src, String owner) {
Chown chown = new Chown();
chown.setTaskName("Chown");
RunTask runner = new RunTask(chown);
chown.setOwner(owner);
FileSet set = src.getAntResource(chown.getProject());
chown.add(set);
chown.setMaxParallel(300);
return runner.postTask();
}
@WebMethod(exclude = true)
private ReturnCode chgrp(FileSetResource src, String group) {
Chgrp chgrp = new Chgrp();
chgrp.setTaskName("Chgrp");
RunTask runner = new RunTask(chgrp);
chgrp.setGroup(group);
FileSet set = src.getAntResource(chgrp.getProject());
chgrp.add(set);
chgrp.setMaxParallel(300);
return runner.postTask();
}
@WebMethod(exclude = true)
private ReturnCode chmod(FileSetResource src, String perm) {
Chmod chmod = new Chmod(); Chmod chmod = new Chmod();
chmod.setTaskName("Chmod"); chmod.setTaskName("Chmod");
RunTask runner = new RunTask(chmod); RunTask runner = new RunTask(chmod);
FileSet set = src.getAntResource(chmod.getProject()); FileSet set = res.getAntResource(chmod.getProject());
chmod.add(set); chmod.add(set);
chmod.setMaxParallel(300); chmod.setMaxParallel(300);
chmod.setPerm(perm); chmod.setPerm(perm);

View File

@ -1,16 +1,877 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <con:soapui-project name="FileServices" soapui-version="3.6.1" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="FileServiceSoapBinding" type="wsdl" bindingName="{http://ws.xservices.brutex.net}FileServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost:8080/XServices/FileService?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:8080/XServices/FileService?wsdl"><con:part><con:url>http://localhost:8080/XServices/FileService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="FileService" targetNamespace="http://ws.xservices.brutex.net" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.xservices.brutex.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body> <wsdl:documentation>/*
<ns2:basenameResponse xmlns:ns2="http://ws.xservices.brutex.net"> * Copyright 2010 Brian Rosenberger (Brutex Network)
<return> *
<returnCode>0</returnCode> * Licensed under the Apache License, Version 2.0 (the "License")
<stdOut/> * you may not use this file except in compliance with the License.
<stdErr/> * You may obtain a copy of the License at
<propertyList> *
<name>basename.value</name> * http://www.apache.org/licenses/LICENSE-2.0
<value>xservices</value> *
</propertyList> * Unless required by applicable law or agreed to in writing, software
</return> * distributed under the License is distributed on an "AS IS" BASIS,
</ns2:basenameResponse> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
</soap:Body> * See the License for the specific language governing permissions and
</soap:Envelope> * limitations under the License.
*/</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ws.xservices.brutex.net" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="antProperty" type="tns:antProperty"/>
<xs:element name="basename" type="tns:basename"/>
<xs:element name="basenameResponse" type="tns:basenameResponse"/>
<xs:element name="changeGroup" type="tns:changeGroup"/>
<xs:element name="changeGroupResponse" type="tns:changeGroupResponse"/>
<xs:element name="changeMode" type="tns:changeMode"/>
<xs:element name="changeModeResponse" type="tns:changeModeResponse"/>
<xs:element name="changeOwner" type="tns:changeOwner"/>
<xs:element name="changeOwnerResponse" type="tns:changeOwnerResponse"/>
<xs:element name="copy" type="tns:copy"/>
<xs:element name="copyFile" type="tns:copyFile"/>
<xs:element name="copyFileResponse" type="tns:copyFileResponse"/>
<xs:element name="copyResponse" type="tns:copyResponse"/>
<xs:element name="downloadFile" type="tns:downloadFile"/>
<xs:element name="downloadFileResponse" type="tns:downloadFileResponse"/>
<xs:element name="echoToFile" type="tns:echoToFile"/>
<xs:element name="echoToFileResponse" type="tns:echoToFileResponse"/>
<xs:element name="loadResource" type="tns:loadResource"/>
<xs:element name="loadResourceFromArchive" type="tns:loadResourceFromArchive"/>
<xs:element name="loadResourceFromArchiveResponse" type="tns:loadResourceFromArchiveResponse"/>
<xs:element name="loadResourceResponse" type="tns:loadResourceResponse"/>
<xs:element name="replaceInFile" type="tns:replaceInFile"/>
<xs:element name="replaceInFile2" type="tns:replaceInFile2"/>
<xs:element name="replaceInFile2Response" type="tns:replaceInFile2Response"/>
<xs:element name="replaceInFileRegEx" type="tns:replaceInFileRegEx"/>
<xs:element name="replaceInFileRegExResponse" type="tns:replaceInFileRegExResponse"/>
<xs:element name="replaceInFileResponse" type="tns:replaceInFileResponse"/>
<xs:element name="replacePattern" type="tns:replacePattern"/>
<xs:element name="uploadFile" type="tns:uploadFile"/>
<xs:element name="uploadFileResponse" type="tns:uploadFileResponse"/>
<xs:complexType name="downloadFile">
<xs:sequence>
<xs:element minOccurs="0" name="file" type="tns:FileResourceType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FileResourceType">
<xs:sequence>
<xs:element default="FILE" name="type" type="tns:type"/>
<xs:element name="uri" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="downloadFileResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:attachmentType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="attachmentType">
<xs:sequence>
<xs:element name="content" ns1:expectedContentTypes="application/octet-stream" type="xs:base64Binary" xmlns:ns1="http://www.w3.org/2005/05/xmlmime"/>
<xs:element minOccurs="0" name="filename" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFileRegEx">
<xs:sequence>
<xs:element minOccurs="0" name="file" type="tns:FileResourceType"/>
<xs:element minOccurs="0" name="search" type="xs:string"/>
<xs:element minOccurs="0" name="replace" type="xs:string"/>
<xs:element minOccurs="0" name="flags" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFileRegExResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReturnCodeType">
<xs:sequence>
<xs:element name="returnCode" type="xs:int"/>
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="tns:antProperty"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="antProperty">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeMode">
<xs:sequence>
<xs:element minOccurs="0" name="fileset" type="tns:FileSetType"/>
<xs:element name="permissions" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FileSetType">
<xs:sequence>
<xs:element default="FILES" name="FileSetType" type="tns:resourcetype"/>
<xs:element name="source" type="xs:string"/>
<xs:element name="filter" nillable="true" type="tns:patternSetType"/>
<xs:element default="" minOccurs="0" name="excludes" nillable="true" type="xs:string"/>
<xs:element default="true" name="casesensitive" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="patternSetType">
<xs:sequence>
<xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="tns:patternElement"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="tns:patternElement"/>
<xs:element minOccurs="0" name="selector" nillable="true" type="tns:selectorType"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="patternElement">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:complexType abstract="true" name="selectorType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="contains" nillable="true" type="tns:containsSelectorType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="containsSelectorType">
<xs:sequence>
<xs:element name="text" type="xs:string"/>
<xs:element default="true" name="casesensitive" type="xs:boolean"/>
<xs:element default="false" name="ignorewhitespace" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeModeResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeOwner">
<xs:sequence>
<xs:element minOccurs="0" name="fileset" type="tns:FileSetType"/>
<xs:element name="owner" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeOwnerResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeGroup">
<xs:sequence>
<xs:element minOccurs="0" name="fileset" type="tns:FileSetType"/>
<xs:element name="group" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="changeGroupResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="echoToFile">
<xs:sequence>
<xs:element name="message" type="xs:string"/>
<xs:element name="file" type="xs:string"/>
<xs:element minOccurs="0" name="encoding" type="xs:string"/>
<xs:element name="append" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="echoToFileResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="uploadFile">
<xs:sequence>
<xs:element minOccurs="0" name="file" type="tns:attachmentType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="uploadFileResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFile2">
<xs:sequence>
<xs:element minOccurs="0" name="file" type="tns:FileResourceType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="patternList" type="tns:replacePattern"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replacePattern">
<xs:sequence>
<xs:element name="search" type="xs:string"/>
<xs:element name="replace" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFile2Response">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="copy">
<xs:sequence>
<xs:element name="fileset" type="tns:FileSetType"/>
<xs:element name="todir" type="xs:string"/>
<xs:element name="preservelastmodified" type="xs:boolean"/>
<xs:element name="overwrite" type="xs:boolean"/>
<xs:element minOccurs="0" name="encoding" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="copyResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFile">
<xs:sequence>
<xs:element name="file" type="tns:FileResourceType"/>
<xs:element name="search" type="xs:string"/>
<xs:element name="replace" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="replaceInFileResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loadResource">
<xs:sequence>
<xs:element minOccurs="0" name="resource" type="tns:FileResourceType"/>
<xs:element minOccurs="0" name="encoding" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loadResourceResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="basename">
<xs:sequence>
<xs:element name="file" type="xs:string"/>
<xs:element minOccurs="0" name="suffix" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="basenameResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loadResourceFromArchive">
<xs:sequence>
<xs:element minOccurs="0" name="archiveresource" type="tns:ArchiveResourceType"/>
<xs:element minOccurs="0" name="encoding" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArchiveResourceType">
<xs:sequence>
<xs:element default="ZIP" name="type" type="tns:archiveType"/>
<xs:element name="archive" type="xs:string"/>
<xs:element name="uri" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loadResourceFromArchiveResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="copyFile">
<xs:sequence>
<xs:element name="fromFile" type="xs:string"/>
<xs:element name="toFile" type="xs:string"/>
<xs:element name="overwrite" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="copyFileResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:ReturnCodeType"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="type">
<xs:restriction base="xs:string">
<xs:enumeration value="FILE"/>
<xs:enumeration value="URL"/>
<xs:enumeration value="GZIP"/>
<xs:enumeration value="BZIP2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="resourcetype">
<xs:restriction base="xs:string">
<xs:enumeration value="FILES"/>
<xs:enumeration value="ZIP"/>
<xs:enumeration value="TAR"/>
<xs:enumeration value="GZTAR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="archiveType">
<xs:restriction base="xs:string">
<xs:enumeration value="ZIP"/>
<xs:enumeration value="TAR"/>
<xs:enumeration value="GZTAR"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="XServicesFault">
<xs:sequence>
<xs:element name="faultstring" nillable="true" type="xs:string"/>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="homedir" nillable="true" type="xs:string"/>
<xs:element name="timestamp" nillable="true" type="xs:anySimpleType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="XServicesFault" type="tns:XServicesFault"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="changeOwnerResponse">
<wsdl:part element="tns:changeOwnerResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="loadResourceResponse">
<wsdl:part element="tns:loadResourceResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFile2Response">
<wsdl:part element="tns:replaceInFile2Response" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFile2">
<wsdl:part element="tns:replaceInFile2" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeMode">
<wsdl:part element="tns:changeMode" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeModeResponse">
<wsdl:part element="tns:changeModeResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFile">
<wsdl:part element="tns:replaceInFile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="loadResourceFromArchive">
<wsdl:part element="tns:loadResourceFromArchive" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="downloadFileResponse">
<wsdl:part element="tns:downloadFileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="downloadFile">
<wsdl:part element="tns:downloadFile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFileRegEx">
<wsdl:part element="tns:replaceInFileRegEx" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeGroupResponse">
<wsdl:part element="tns:changeGroupResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeOwner">
<wsdl:part element="tns:changeOwner" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="loadResource">
<wsdl:part element="tns:loadResource" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="copyResponse">
<wsdl:part element="tns:copyResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="basename">
<wsdl:part element="tns:basename" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="uploadFile">
<wsdl:part element="tns:uploadFile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="uploadFileResponse">
<wsdl:part element="tns:uploadFileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="copy">
<wsdl:part element="tns:copy" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeGroup">
<wsdl:part element="tns:changeGroup" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="loadResourceFromArchiveResponse">
<wsdl:part element="tns:loadResourceFromArchiveResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="XServicesFault">
<wsdl:part element="tns:XServicesFault" name="XServicesFault"></wsdl:part>
</wsdl:message>
<wsdl:message name="echoToFileResponse">
<wsdl:part element="tns:echoToFileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFileRegExResponse">
<wsdl:part element="tns:replaceInFileRegExResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="replaceInFileResponse">
<wsdl:part element="tns:replaceInFileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="copyFileResponse">
<wsdl:part element="tns:copyFileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="echoToFile">
<wsdl:part element="tns:echoToFile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="basenameResponse">
<wsdl:part element="tns:basenameResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="copyFile">
<wsdl:part element="tns:copyFile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:portType name="FileService">
<wsdl:operation name="downloadFile">
<wsdl:documentation>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.</wsdl:documentation>
<wsdl:input message="tns:downloadFile" name="downloadFile"></wsdl:input>
<wsdl:output message="tns:downloadFileResponse" name="downloadFileResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="replaceInFileRegEx">
<wsdl:input message="tns:replaceInFileRegEx" name="replaceInFileRegEx"></wsdl:input>
<wsdl:output message="tns:replaceInFileRegExResponse" name="replaceInFileRegExResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeMode">
<wsdl:input message="tns:changeMode" name="changeMode"></wsdl:input>
<wsdl:output message="tns:changeModeResponse" name="changeModeResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeOwner">
<wsdl:input message="tns:changeOwner" name="changeOwner"></wsdl:input>
<wsdl:output message="tns:changeOwnerResponse" name="changeOwnerResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeGroup">
<wsdl:input message="tns:changeGroup" name="changeGroup"></wsdl:input>
<wsdl:output message="tns:changeGroupResponse" name="changeGroupResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="echoToFile">
<wsdl:documentation>Write or append a string to a file</wsdl:documentation>
<wsdl:input message="tns:echoToFile" name="echoToFile"></wsdl:input>
<wsdl:output message="tns:echoToFileResponse" name="echoToFileResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="uploadFile">
<wsdl:documentation>Send a file from client to web service server using either MTOM attachment or base64 inline attachment.</wsdl:documentation>
<wsdl:input message="tns:uploadFile" name="uploadFile"></wsdl:input>
<wsdl:output message="tns:uploadFileResponse" name="uploadFileResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="replaceInFile2">
<wsdl:input message="tns:replaceInFile2" name="replaceInFile2"></wsdl:input>
<wsdl:output message="tns:replaceInFile2Response" name="replaceInFile2Response"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="copy">
<wsdl:documentation>Copies a fileset locally on the server.</wsdl:documentation>
<wsdl:input message="tns:copy" name="copy"></wsdl:input>
<wsdl:output message="tns:copyResponse" name="copyResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="replaceInFile">
<wsdl:input message="tns:replaceInFile" name="replaceInFile"></wsdl:input>
<wsdl:output message="tns:replaceInFileResponse" name="replaceInFileResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="loadResource">
<wsdl:documentation>Load the content of a resource</wsdl:documentation>
<wsdl:input message="tns:loadResource" name="loadResource"></wsdl:input>
<wsdl:output message="tns:loadResourceResponse" name="loadResourceResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="basename">
<wsdl:documentation>The base name of the given file excluding the suffix.</wsdl:documentation>
<wsdl:input message="tns:basename" name="basename"></wsdl:input>
<wsdl:output message="tns:basenameResponse" name="basenameResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="loadResourceFromArchive">
<wsdl:documentation>Load the content of a resource</wsdl:documentation>
<wsdl:input message="tns:loadResourceFromArchive" name="loadResourceFromArchive"></wsdl:input>
<wsdl:output message="tns:loadResourceFromArchiveResponse" name="loadResourceFromArchiveResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="copyFile">
<wsdl:documentation>Copies a single file locally on the server</wsdl:documentation>
<wsdl:input message="tns:copyFile" name="copyFile"></wsdl:input>
<wsdl:output message="tns:copyFileResponse" name="copyFileResponse"></wsdl:output>
<wsdl:fault message="tns:XServicesFault" name="XServicesFault"></wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FileServiceSoapBinding" type="tns:FileService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="downloadFile">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="downloadFile">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="downloadFileResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="changeMode">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="changeMode">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="changeModeResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="replaceInFileRegEx">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="replaceInFileRegEx">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="replaceInFileRegExResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeOwner">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="changeOwner">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="changeOwnerResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeGroup">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="changeGroup">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="changeGroupResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="echoToFile">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="echoToFile">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="echoToFileResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="replaceInFile2">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="replaceInFile2">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="replaceInFile2Response">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="uploadFile">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="uploadFile">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="uploadFileResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="copy">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="copy">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="copyResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="replaceInFile">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="replaceInFile">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="replaceInFileResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="loadResource">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="loadResource">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="loadResourceResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="basename">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="basename">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="basenameResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="loadResourceFromArchive">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="loadResourceFromArchive">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="loadResourceFromArchiveResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="copyFile">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="copyFile">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="copyFileResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="XServicesFault">
<soap:fault name="XServicesFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FileService">
<wsdl:port binding="tns:FileServiceSoapBinding" name="FileServiceImplPort">
<soap:address location="http://localhost:8080/XServices/FileService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="basename" bindingOperationName="basename" type="Request-Response" outputName="basenameResponse" inputName="basename" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:basename>
<file>?</file>
<!--Optional:-->
<suffix>?</suffix>
</ws:basename>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/basename"/></con:call></con:operation><con:operation isOneWay="false" action="" name="changeGroup" bindingOperationName="changeGroup" type="Request-Response" outputName="changeGroupResponse" inputName="changeGroup" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:changeGroup>
<!--Optional:-->
<fileset>
<FileSetType>FILES</FileSetType>
<source>?</source>
<filter>
<!--Zero or more repetitions:-->
<include>**/*</include>
<!--Zero or more repetitions:-->
<exclude>?</exclude>
<!--Optional:-->
<selector>
<!--Zero or more repetitions:-->
<contains>
<text>?</text>
<casesensitive>true</casesensitive>
<ignorewhitespace>false</ignorewhitespace>
</contains>
</selector>
</filter>
<!--Optional:-->
<excludes/>
<casesensitive>true</casesensitive>
</fileset>
<group>?</group>
</ws:changeGroup>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/changeGroup"/></con:call></con:operation><con:operation isOneWay="false" action="" name="changeMode" bindingOperationName="changeMode" type="Request-Response" outputName="changeModeResponse" inputName="changeMode" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:changeMode>
<!--Optional:-->
<fileset>
<FileSetType>FILES</FileSetType>
<source>?</source>
<filter>
<!--Zero or more repetitions:-->
<include>**/*</include>
<!--Zero or more repetitions:-->
<exclude>?</exclude>
<!--Optional:-->
<selector>
<!--Zero or more repetitions:-->
<contains>
<text>?</text>
<casesensitive>true</casesensitive>
<ignorewhitespace>false</ignorewhitespace>
</contains>
</selector>
</filter>
<!--Optional:-->
<excludes/>
<casesensitive>true</casesensitive>
</fileset>
<permissions>?</permissions>
</ws:changeMode>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/changeMode"/></con:call></con:operation><con:operation isOneWay="false" action="" name="changeOwner" bindingOperationName="changeOwner" type="Request-Response" outputName="changeOwnerResponse" inputName="changeOwner" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:changeOwner>
<!--Optional:-->
<fileset>
<FileSetType>FILES</FileSetType>
<source>?</source>
<filter>
<!--Zero or more repetitions:-->
<include>**/*</include>
<!--Zero or more repetitions:-->
<exclude>?</exclude>
<!--Optional:-->
<selector>
<!--Zero or more repetitions:-->
<contains>
<text>?</text>
<casesensitive>true</casesensitive>
<ignorewhitespace>false</ignorewhitespace>
</contains>
</selector>
</filter>
<!--Optional:-->
<excludes/>
<casesensitive>true</casesensitive>
</fileset>
<owner>?</owner>
</ws:changeOwner>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/changeOwner"/></con:call></con:operation><con:operation isOneWay="false" action="" name="copy" bindingOperationName="copy" type="Request-Response" outputName="copyResponse" inputName="copy" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:copy>
<fileset>
<FileSetType>FILES</FileSetType>
<source>?</source>
<filter>
<!--Zero or more repetitions:-->
<include>**/*</include>
<!--Zero or more repetitions:-->
<exclude>?</exclude>
<!--Optional:-->
<selector>
<!--Zero or more repetitions:-->
<contains>
<text>?</text>
<casesensitive>true</casesensitive>
<ignorewhitespace>false</ignorewhitespace>
</contains>
</selector>
</filter>
<!--Optional:-->
<excludes/>
<casesensitive>true</casesensitive>
</fileset>
<todir>?</todir>
<preservelastmodified>?</preservelastmodified>
<overwrite>?</overwrite>
<!--Optional:-->
<encoding>?</encoding>
</ws:copy>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/copy"/></con:call></con:operation><con:operation isOneWay="false" action="" name="copyFile" bindingOperationName="copyFile" type="Request-Response" outputName="copyFileResponse" inputName="copyFile" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:copyFile>
<fromFile>?</fromFile>
<toFile>?</toFile>
<overwrite>?</overwrite>
</ws:copyFile>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/copyFile"/></con:call></con:operation><con:operation isOneWay="false" action="" name="downloadFile" bindingOperationName="downloadFile" type="Request-Response" outputName="downloadFileResponse" inputName="downloadFile" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:downloadFile>
<!--Optional:-->
<file>
<type>FILE</type>
<uri>?</uri>
</file>
</ws:downloadFile>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/downloadFile"/></con:call></con:operation><con:operation isOneWay="false" action="" name="echoToFile" bindingOperationName="echoToFile" type="Request-Response" outputName="echoToFileResponse" inputName="echoToFile" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:echoToFile>
<message>?</message>
<file>?</file>
<!--Optional:-->
<encoding>?</encoding>
<append>?</append>
</ws:echoToFile>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/echoToFile"/></con:call></con:operation><con:operation isOneWay="false" action="" name="loadResource" bindingOperationName="loadResource" type="Request-Response" outputName="loadResourceResponse" inputName="loadResource" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:loadResource>
<!--Optional:-->
<resource>
<type>FILE</type>
<uri>?</uri>
</resource>
<!--Optional:-->
<encoding>?</encoding>
</ws:loadResource>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/loadResource"/></con:call></con:operation><con:operation isOneWay="false" action="" name="loadResourceFromArchive" bindingOperationName="loadResourceFromArchive" type="Request-Response" outputName="loadResourceFromArchiveResponse" inputName="loadResourceFromArchive" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:loadResourceFromArchive>
<!--Optional:-->
<archiveresource>
<type>ZIP</type>
<archive>?</archive>
<uri>?</uri>
</archiveresource>
<!--Optional:-->
<encoding>?</encoding>
</ws:loadResourceFromArchive>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/loadResourceFromArchive"/></con:call></con:operation><con:operation isOneWay="false" action="" name="replaceInFile" bindingOperationName="replaceInFile" type="Request-Response" outputName="replaceInFileResponse" inputName="replaceInFile" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:replaceInFile>
<file>
<type>FILE</type>
<uri>?</uri>
</file>
<search>?</search>
<replace>?</replace>
</ws:replaceInFile>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/replaceInFile"/></con:call></con:operation><con:operation isOneWay="false" action="" name="replaceInFile2" bindingOperationName="replaceInFile2" type="Request-Response" outputName="replaceInFile2Response" inputName="replaceInFile2" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:replaceInFile2>
<!--Optional:-->
<file>
<type>FILE</type>
<uri>?</uri>
</file>
<!--Zero or more repetitions:-->
<patternList>
<search>?</search>
<replace>?</replace>
</patternList>
</ws:replaceInFile2>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/replaceInFile2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="replaceInFileRegEx" bindingOperationName="replaceInFileRegEx" type="Request-Response" outputName="replaceInFileRegExResponse" inputName="replaceInFileRegEx" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:replaceInFileRegEx>
<!--Optional:-->
<file>
<type>FILE</type>
<uri>?</uri>
</file>
<!--Optional:-->
<search>?</search>
<!--Optional:-->
<replace>?</replace>
<!--Optional:-->
<flags>?</flags>
</ws:replaceInFileRegEx>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/replaceInFileRegEx"/></con:call></con:operation><con:operation isOneWay="false" action="" name="uploadFile" bindingOperationName="uploadFile" type="Request-Response" outputName="uploadFileResponse" inputName="uploadFile" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/XServices/FileService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.xservices.brutex.net">
<soapenv:Header/>
<soapenv:Body>
<ws:uploadFile>
<!--Optional:-->
<file>
<content>cid:1190185022376</content>
<!--Optional:-->
<filename>?</filename>
</file>
</ws:uploadFile>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://ws.xservices.brutex.net/FileService/uploadFile"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>