diff --git a/lib/cxf-2.2.6.jar b/lib/cxf-2.3.0-SNAPSHOT.jar old mode 100755 new mode 100644 similarity index 59% rename from lib/cxf-2.2.6.jar rename to lib/cxf-2.3.0-SNAPSHOT.jar index 384d419..5aeb1c8 Binary files a/lib/cxf-2.2.6.jar and b/lib/cxf-2.3.0-SNAPSHOT.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 2dd6e42..ebc7581 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -563,7 +563,6 @@ exists or setup the property manually. For example like this: - @@ -586,6 +585,8 @@ exists or setup the property manually. For example like this: + + @@ -625,7 +626,6 @@ exists or setup the property manually. For example like this: - @@ -648,6 +648,8 @@ exists or setup the property manually. For example like this: + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 8fabbcd..aa127aa 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,9 +1,9 @@ -build.xml.data.CRC32=6aca1953 +build.xml.data.CRC32=61687631 build.xml.script.CRC32=d8ac74c8 build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=6aca1953 -nbproject/build-impl.xml.script.CRC32=a300afa5 +nbproject/build-impl.xml.data.CRC32=61687631 +nbproject/build-impl.xml.script.CRC32=ed225302 nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1 nbproject/jaxws-build.xml.stylesheet.CRC32=83928735 diff --git a/nbproject/project.properties b/nbproject/project.properties index ea91f0a..b393465 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -33,6 +33,7 @@ file.reference.ant-apache-log4j.jar=lib/ant-apache-log4j.jar file.reference.ant-apache-oro.jar=lib/ant-apache-oro.jar file.reference.ant-apache-regexp.jar=lib/ant-apache-regexp.jar file.reference.ant-apache-resolver.jar=lib/ant-apache-resolver.jar +file.reference.ant-apache-xalan2.jar=lib/ant-apache-xalan2.jar file.reference.ant-commons-logging.jar=lib/ant-commons-logging.jar file.reference.ant-commons-net.jar=lib/ant-commons-net.jar file.reference.ant-jai.jar=lib/ant-jai.jar @@ -59,7 +60,7 @@ file.reference.commons-lang-2.4.jar=lib/commons-lang-2.4.jar file.reference.commons-logging-api-1.0.4.jar=lib/commons-logging-api-1.0.4.jar file.reference.commons-net-2.0.jar=lib/commons-net-2.0.jar file.reference.commons-net-ftp-2.0.jar=lib/commons-net-ftp-2.0.jar -file.reference.cxf-2.2.6.jar=lib/cxf-2.2.6.jar +file.reference.cxf-2.3.0-SNAPSHOT.jar=lib/cxf-2.3.0-SNAPSHOT.jar file.reference.jakarta-oro-2.0.8.jar=lib/jakarta-oro-2.0.8.jar file.reference.java-unrar-0.3.jar=lib/java-unrar-0.3.jar file.reference.jettison-1.2.jar=lib/jettison-1.2.jar @@ -117,7 +118,6 @@ javac.classpath=\ ${file.reference.ant.jar}:\ ${file.reference.commons-collections-3.2.1.jar}:\ ${file.reference.commons-lang-2.4.jar}:\ - ${file.reference.cxf-2.2.6.jar}:\ ${file.reference.neethi-2.0.4.jar}:\ ${file.reference.aopalliance-1.0.jar}:\ ${file.reference.spring-beans-2.5.6.jar}:\ @@ -139,7 +139,9 @@ javac.classpath=\ ${file.reference.jettison-1.2.jar}:\ ${file.reference.jsr311-api-1.0.jar}:\ ${file.reference.xml-resolver-1.2.jar}:\ - ${libs.metro.classpath} + ${libs.metro.classpath}:\ + ${file.reference.ant-apache-xalan2.jar}:\ + ${file.reference.cxf-2.3.0-SNAPSHOT.jar} # Space-separated list of extra javac options javac.compilerargs= javac.debug=true diff --git a/nbproject/project.xml b/nbproject/project.xml index 70a1fbe..e8132bd 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -149,10 +149,6 @@ ${file.reference.commons-lang-2.4.jar} WEB-INF/lib - - ${file.reference.cxf-2.2.6.jar} - WEB-INF/lib - ${file.reference.neethi-2.0.4.jar} WEB-INF/lib @@ -241,6 +237,14 @@ ${libs.metro.classpath} WEB-INF/lib + + ${file.reference.ant-apache-xalan2.jar} + WEB-INF/lib + + + ${file.reference.cxf-2.3.0-SNAPSHOT.jar} + WEB-INF/lib + diff --git a/src/java/net/brutex/xservices/types/ContainsSelectorType.java b/src/java/net/brutex/xservices/types/ContainsSelectorType.java new file mode 100644 index 0000000..5bf48b8 --- /dev/null +++ b/src/java/net/brutex/xservices/types/ContainsSelectorType.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010 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.types; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.tools.ant.types.selectors.ContainsSelector; +import org.apache.tools.ant.types.selectors.FileSelector; + +/** + * + * @author Brian Rosenberger, bru@brutex.de + */ +@XmlType +public class ContainsSelectorType implements SelectorTypeInterface { + + public static final String XML_NAME="contains"; + + public ContainsSelectorType() { + } + + public FileSelector getSelector() { + ContainsSelector selector = new ContainsSelector(); + selector.setCasesensitive(casesensitive); + selector.setText(text); + selector.setIgnorewhitespace(ignorewhitespace); + return selector; + } + + @XmlElement(required=true, nillable=false) + public String text; + + @XmlElement(required=true, defaultValue="true") + public boolean casesensitive; + + @XmlElement(required=true, defaultValue="false") + public boolean ignorewhitespace; + +} diff --git a/src/java/net/brutex/xservices/types/FileSetResource.java b/src/java/net/brutex/xservices/types/FileSetResource.java index cf0a657..84f601f 100644 --- a/src/java/net/brutex/xservices/types/FileSetResource.java +++ b/src/java/net/brutex/xservices/types/FileSetResource.java @@ -31,7 +31,7 @@ import org.apache.tools.ant.types.ZipFileSet; * @author Brian Rosenberger, bru@brutex.de */ @XmlType(name = "FileSetType", namespace = "http://ws.xservices.brutex.net", -propOrder = {"type", "source", "includes", "excludes", "casesensitive"}) +propOrder = {"type", "source", "filter", "excludes", "casesensitive"}) public class FileSetResource { /** @@ -51,8 +51,9 @@ public class FileSetResource { * Pattern of files to include. * */ - @XmlElement(name = "includes", required = true, nillable = false, defaultValue = "**/*") - public String includes = ""; + @XmlElement(name = PatternSetType.XML_NAME, required = true, nillable = true) + public PatternSetType filter; + /** * Pattern of files to exclude. */ @@ -95,7 +96,7 @@ public class FileSetResource { set.setDir(new File(source)); } set.setProject(p); - set.setIncludes(includes); + //set.setIncludes(includes); set.setExcludes(excludes); set.setCaseSensitive(casesensitive); diff --git a/src/java/net/brutex/xservices/types/PatternElement.java b/src/java/net/brutex/xservices/types/PatternElement.java new file mode 100644 index 0000000..e17b8b2 --- /dev/null +++ b/src/java/net/brutex/xservices/types/PatternElement.java @@ -0,0 +1,20 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package net.brutex.xservices.types; + +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + * + * @author brian + */ +@XmlType() +public class PatternElement { + + @XmlValue() + public String pattern; +} diff --git a/src/java/net/brutex/xservices/types/PatternSetType.java b/src/java/net/brutex/xservices/types/PatternSetType.java new file mode 100644 index 0000000..e5fa887 --- /dev/null +++ b/src/java/net/brutex/xservices/types/PatternSetType.java @@ -0,0 +1,41 @@ +/* + * Copyright 2010 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.types; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; + +/** + * + * @author Brian Rosenberger + */ + +public class PatternSetType { + + public static final String XML_NAME = "filter"; + + @XmlElement(required=false, nillable=false, defaultValue="**/*") + public List include; + + @XmlElement(required=false, nillable=false) + public List exclude; + + @XmlElement(required=false, nillable=true) + public SelectorType selector; + + public PatternSetType() { + } +} diff --git a/src/java/net/brutex/xservices/types/SelectorType.java b/src/java/net/brutex/xservices/types/SelectorType.java new file mode 100644 index 0000000..15b716b --- /dev/null +++ b/src/java/net/brutex/xservices/types/SelectorType.java @@ -0,0 +1,36 @@ +/* + * Copyright 2010 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.types; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import org.apache.tools.ant.types.selectors.FileSelector; + +/** + * + * @author Brian Rosenberger, bru@brutex.de + */ +public abstract class SelectorType implements SelectorTypeInterface { + + public SelectorType() { + } + + @XmlElement(name=ContainsSelectorType.XML_NAME, nillable=true) + public List contains; + + +} diff --git a/src/java/net/brutex/xservices/types/SelectorTypeInterface.java b/src/java/net/brutex/xservices/types/SelectorTypeInterface.java new file mode 100644 index 0000000..f558c23 --- /dev/null +++ b/src/java/net/brutex/xservices/types/SelectorTypeInterface.java @@ -0,0 +1,16 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package net.brutex.xservices.types; + +import org.apache.tools.ant.types.selectors.FileSelector; + +/** + * + * @author brian + */ +public interface SelectorTypeInterface { + public FileSelector getSelector(); +} diff --git a/src/java/net/brutex/xservices/ws/MiscService.java b/src/java/net/brutex/xservices/ws/MiscService.java index d2c3100..aa4f6fd 100644 --- a/src/java/net/brutex/xservices/ws/MiscService.java +++ b/src/java/net/brutex/xservices/ws/MiscService.java @@ -23,6 +23,7 @@ import net.brutex.xservices.types.HostConnection; import net.brutex.xservices.types.MailMimeType; import net.brutex.xservices.types.ReturnCode; import net.brutex.xservices.util.BrutexNamespaces; +import org.apache.cxf.annotations.WSDLDocumentation; /** * @@ -31,9 +32,24 @@ import net.brutex.xservices.util.BrutexNamespaces; @WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES) public interface MiscService { + + + /** + * @param hostname + * @return + */ @WebMethod(operationName = "getHostinfo") public ReturnCode getHostinfo(@WebParam(name = "hostname") String hostname); + /** + * + * @param mailhost + * @param from + * @param tolist + * @param subject + * @param message + * @return + */ @WebMethod(operationName = "sendMailSimple") public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost, @WebParam(name = "from") String from, @@ -41,6 +57,16 @@ public interface MiscService { @WebParam(name = "subject") String subject, @WebParam(name = "message") String message); + /** + * + * @param mailhost + * @param from + * @param tolist + * @param subject + * @param message + * @param res + * @return + */ @WebMethod(operationName = "sendMailSimpleWithAttachment") public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost, @WebParam(name = "from") String from, @@ -49,6 +75,22 @@ public interface MiscService { @WebParam(name = "message") String message, @WebParam(name = "attachments") FileSetResource res); + /** + * + * @param mailhost + * @param from + * @param tolist + * @param cclist + * @param bcclist + * @param subject + * @param mimetype + * @param charset + * @param message + * @param res + * @param ssl + * @param tls + * @return + */ @WebMethod(operationName = "sendMail") public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost, @WebParam(name = "from") String from, @@ -63,6 +105,12 @@ public interface MiscService { @WebParam(name = "useSSL") boolean ssl, @WebParam(name = "useStartTLS") boolean tls); + /** + * + * @param minutes + * @param seconds + * @return + */ @WebMethod(operationName = "sleep") public ReturnCode sleep(@WebParam(name = "minutes") int minutes, @WebParam(name = "seconds") int seconds); diff --git a/src/java/net/brutex/xservices/ws/MiscServiceImpl.java b/src/java/net/brutex/xservices/ws/MiscServiceImpl.java index 0cae2b9..0b0d6e2 100644 --- a/src/java/net/brutex/xservices/ws/MiscServiceImpl.java +++ b/src/java/net/brutex/xservices/ws/MiscServiceImpl.java @@ -22,6 +22,8 @@ import net.brutex.xservices.types.HostConnection; import net.brutex.xservices.types.MailMimeType; import net.brutex.xservices.types.ReturnCode; import net.brutex.xservices.util.RunTask; +import org.apache.cxf.annotations.WSDLDocumentation; +import org.apache.cxf.annotations.WSDLDocumentationCollection; import org.apache.tools.ant.taskdefs.HostInfo; import org.apache.tools.ant.taskdefs.Sleep; import org.apache.tools.ant.taskdefs.email.EmailTask; @@ -30,10 +32,20 @@ import org.apache.tools.ant.taskdefs.email.EmailTask; * * @author Brian Rosenberger, bru@brutex.de */ +@WSDLDocumentationCollection( + { + @WSDLDocumentation("My portType documentation"), + @WSDLDocumentation(value = "My top level documentation", + placement = WSDLDocumentation.Placement.TOP), + @WSDLDocumentation(value = "My binding doc", + placement = WSDLDocumentation.Placement.BINDING) + } +) @WebService(endpointInterface="net.brutex.xservices.ws.MiscService", serviceName="MiscService") public class MiscServiceImpl implements MiscService { + @WSDLDocumentation(value="Get information about a host.") public ReturnCode getHostinfo(String hostname) { return antGetHostinfo(hostname, null); }