From 373d73f3d8c23cf7f68438d2bcbc8d1813fc4e4b Mon Sep 17 00:00:00 2001 From: Brian Rosenberger Date: Fri, 20 Apr 2012 18:09:37 +0000 Subject: [PATCH] Various WS updates git-svn-id: https://brutex.net/svn/xservices/trunk@85 e7e49efb-446e-492e-b9ec-fcafc1997a86 --- doc/BruteXServices_User_Guide.dbk | 101 ++++++-------- doc/BruteXServices_User_Guide.xml | 25 +++- doc/MailServices.xml | 9 ++ doc/MailServices/sendMailSimple.xml | 10 ++ doc/MiscServices.xml | 1 + doc/MiscServices/sleep.xml | 15 +++ doc/common/abstract.xml | 61 +-------- .../net/brutex/xservices/ws/MailService.java | 123 ++++++++++++++++++ .../net/brutex/xservices/ws/MiscService.java | 81 +----------- .../brutex/xservices/ws/XServicesFault.java | 2 + .../xservices/ws/impl/MailServiceImpl.java | 94 +++++++++++++ .../xservices/ws/impl/MiscServiceImpl.java | 6 +- web/WEB-INF/cxf-beans.xml | 5 +- 13 files changed, 336 insertions(+), 197 deletions(-) create mode 100644 doc/MailServices.xml create mode 100644 doc/MailServices/sendMailSimple.xml create mode 100644 doc/MiscServices/sleep.xml create mode 100644 src/java/net/brutex/xservices/ws/MailService.java create mode 100644 src/java/net/brutex/xservices/ws/impl/MailServiceImpl.java diff --git a/doc/BruteXServices_User_Guide.dbk b/doc/BruteXServices_User_Guide.dbk index c55fe6f..17e2234 100644 --- a/doc/BruteXServices_User_Guide.dbk +++ b/doc/BruteXServices_User_Guide.dbk @@ -1,7 +1,7 @@ Brutex XServices Documentation - February, 16th 2010 + Januar 2012 Brian Rosenberger @@ -9,7 +9,7 @@ Brutex Network - 2011 + 2012 @@ -20,66 +20,29 @@ + + + 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. + Apache Tomcat and Apache Ant are trademarks of the Apache Software Foundation. - Abstract - In complex IT environments it is necessary to integrate - different information systems with each other, exchange data - between - tools and automate actions and function calls depending - on events - arising from user interaction. To meet the requirements - of - integration building usually means to implement APIs and to - create - tool-to-tool bridges. Web Services can help to clean up - bridges into - interfaces as well as to abstract functions from - their underlying - platform and implementation. - These are the major goals of the loosely coupled - integration - strategy which is in turn one essential idea of a - service-oriented - architecture (SOA). - provide a low level set of functions and web services. - These can - be orchestrated into services and used in business - processes which - make up the execution part of a SOA - environment. - is an add-on to XBridgeNG 2.0. It runs standalone or in - combination with XBridgeNG. Pure XBridgeNG has two - components: - - - - XML Schema for item based data types (e.g. tickets - from a bug - tracker system or a database record) - - - Set of Apache Ant tasks to function as a bridge - between the - XBridgeNG XML format at legacy 3rd party - software (e.g. HP Quality - Center, Serena TeamTrack, - ...) - - - The add Web Services (SOAP) wrapper around Apache Ant - tasks - (since XBridgeNG 2.0) - - - - The current focus is on file-based operations. do not - contain an - integration server or a process execution - engine. - + Abstract + In complex IT environments it is often necessary to integrate different information systems with each other, exchange data between software tools and automate actions based on events arising from user interaction. Web Services is a popular way to make remote functions available to a broad range of clients. A WebService is independent from platforms and programming languages. XML Messages are exchanged through common protocols like TCP/IP or SMTP, processed and returned (request/ response paradigm). + Because of their nature, WebServices are a great technology to overcome system boundaries and to "orchestrate" your IT environment. They make up the basis for SOA and are the pieces that assemble automated business processes. + XServices is a collection of pre-build WebServices with the intention to avoid duplicate work and "re-inventing the wheel". The historical base for XServices is the 'XBridgeNG' software, which provided a set of Apache Ant Tasks with quite the same intention. The available WebService operations are most likely the "most wanted" ones, some of the for sure are "must have". This collection may overlap with other libraries. In summary the current version contains 8 WebServices with over 50 operations. + @@ -3350,7 +3313,7 @@ ]]> - +
ExecuteServices The ExecuteService bundles local and remote command @@ -3826,6 +3789,15 @@ FileServices The FileServces bundles various file operations. Its WSDL is located at http://server:port/XServices/FileService?wsdl +
+
+ MailServices + The MailService contains mail send and receive operations. Its WSDL is located at + http://server:port/XServices/MailService?wsdl +
+ sendMailSimple + Send email. +
MiscServices @@ -3897,7 +3869,16 @@ ]]>
- +
+ sleep + Delays the response by the given minutes/ seconds. Please note, + that it may take more time to perform the server roundtrip (network + delays, parsing, etc.). Also you may have a network timeout set up in + Tomcat or your client that prevents this web service to respond + correctly. + +
+
diff --git a/doc/BruteXServices_User_Guide.xml b/doc/BruteXServices_User_Guide.xml index ba8288c..dc6c876 100644 --- a/doc/BruteXServices_User_Guide.xml +++ b/doc/BruteXServices_User_Guide.xml @@ -7,7 +7,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude"> Brutex XServices Documentation - February, 16th 2010 + Januar 2012 Brian Rosenberger @@ -15,7 +15,7 @@ Brutex Network - 2011 + 2012 @@ -26,6 +26,20 @@ + + + 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. + Apache Tomcat and Apache Ant are trademarks of the Apache Software Foundation. @@ -35,17 +49,18 @@ Getting started This chapter describes the installation process. - + Available Services List of available web services and their operations. - + - + + diff --git a/doc/MailServices.xml b/doc/MailServices.xml new file mode 100644 index 0000000..606b29d --- /dev/null +++ b/doc/MailServices.xml @@ -0,0 +1,9 @@ + +
+ MailServices + The MailService contains mail send and receive operations. Its WSDL is located at + http://server:port/XServices/MailService?wsdl + +
\ No newline at end of file diff --git a/doc/MailServices/sendMailSimple.xml b/doc/MailServices/sendMailSimple.xml new file mode 100644 index 0000000..1dcad08 --- /dev/null +++ b/doc/MailServices/sendMailSimple.xml @@ -0,0 +1,10 @@ + + +%myent; +]> +
+ sendMailSimple + Send email. +
\ No newline at end of file diff --git a/doc/MiscServices.xml b/doc/MiscServices.xml index b48a2c1..da9d081 100644 --- a/doc/MiscServices.xml +++ b/doc/MiscServices.xml @@ -7,4 +7,5 @@ http://server:port/XServices/MiscService?wsdl + \ No newline at end of file diff --git a/doc/MiscServices/sleep.xml b/doc/MiscServices/sleep.xml new file mode 100644 index 0000000..ccb215a --- /dev/null +++ b/doc/MiscServices/sleep.xml @@ -0,0 +1,15 @@ + + +%myent; +]> +
+ sleep + Delays the response by the given minutes/ seconds. Please note, + that it may take more time to perform the server roundtrip (network + delays, parsing, etc.). Also you may have a network timeout set up in + Tomcat or your client that prevents this web service to respond + correctly. + +
\ No newline at end of file diff --git a/doc/common/abstract.xml b/doc/common/abstract.xml index 3015c24..351d8dc 100644 --- a/doc/common/abstract.xml +++ b/doc/common/abstract.xml @@ -1,59 +1,8 @@ - Abstract - In complex IT environments it is necessary to integrate - different information systems with each other, exchange data - between - tools and automate actions and function calls depending - on events - arising from user interaction. To meet the requirements - of - integration building usually means to implement APIs and to - create - tool-to-tool bridges. Web Services can help to clean up - bridges into - interfaces as well as to abstract functions from - their underlying - platform and implementation. - These are the major goals of the loosely coupled - integration - strategy which is in turn one essential idea of a - service-oriented - architecture (SOA). - provide a low level set of functions and web services. - These can - be orchestrated into services and used in business - processes which - make up the execution part of a SOA - environment. - is an add-on to XBridgeNG 2.0. It runs standalone or in - combination with XBridgeNG. Pure XBridgeNG has two - components: - - - - XML Schema for item based data types (e.g. tickets - from a bug - tracker system or a database record) - - - Set of Apache Ant tasks to function as a bridge - between the - XBridgeNG XML format at legacy 3rd party - software (e.g. HP Quality - Center, Serena TeamTrack, - ...) - - - The add Web Services (SOAP) wrapper around Apache Ant - tasks - (since XBridgeNG 2.0) - - - - The current focus is on file-based operations. do not - contain an - integration server or a process execution - engine. - + Abstract + In complex IT environments it is often necessary to integrate different information systems with each other, exchange data between software tools and automate actions based on events arising from user interaction. Web Services is a popular way to make remote functions available to a broad range of clients. A WebService is independent from platforms and programming languages. XML Messages are exchanged through common protocols like TCP/IP or SMTP, processed and returned (request/ response paradigm). + Because of their nature, WebServices are a great technology to overcome system boundaries and to "orchestrate" your IT environment. They make up the basis for SOA and are the pieces that assemble automated business processes. + XServices is a collection of pre-build WebServices with the intention to avoid duplicate work and "re-inventing the wheel". The historical base for XServices is the 'XBridgeNG' software, which provided a set of Apache Ant Tasks with quite the same intention. The available WebService operations are most likely the "most wanted" ones, some of the for sure are "must have". This collection may overlap with other libraries. In summary the current version contains 8 WebServices with over 50 operations. + diff --git a/src/java/net/brutex/xservices/ws/MailService.java b/src/java/net/brutex/xservices/ws/MailService.java new file mode 100644 index 0000000..e43d83e --- /dev/null +++ b/src/java/net/brutex/xservices/ws/MailService.java @@ -0,0 +1,123 @@ +/* + * Copyright 2012 Brian Rosenberger (Brutex Network) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.brutex.xservices.ws; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlElement; + +import net.brutex.xservices.types.HostConnection; +import net.brutex.xservices.types.MailMimeType; +import net.brutex.xservices.types.ReturnCode; +import net.brutex.xservices.types.ant.FileSetResource; +import net.brutex.xservices.util.BrutexNamespaces; + +import org.apache.cxf.annotations.WSDLDocumentation; + +/** + * Bundles various method for sending and receiving mails + * + * @author Brian Rosenberger, bru@brutex.de + * @since 2.0.0 + */ +@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES) +@WSDLDocumentation("Various mail service operations.") +public interface MailService { + + final String PARAM_SMTPHOST = "mailhost"; + final String PARAM_SENDER = "from"; + final String PARAM_RECEIVER = "to"; + final String PARAM_SUBJECT = "subject"; + final String PARAM_MESSAGE = "message"; + final String PARAM_ATTACHMENTS = "attachments"; + + /** + * Simple mail send operation with sender, single receiver, subject and message. + * + * @param mailhost connection details for the SMTP server to use + * @param from mail address to be used as sender + * @param tolist mail address of the receiver + * @param subject subject of the mail + * @param message mail body + * @return ReturnCode + */ + @WebMethod(operationName = "sendMailSimple") + @WSDLDocumentation(value = "Send an email (simple).") + public ReturnCode sendMailSimple( + @WebParam(name = PARAM_SMTPHOST) @XmlElement(required=true, nillable=false) HostConnection mailhost, + @WebParam(name = PARAM_SENDER) @XmlElement(required=true) String from, + @WebParam(name = PARAM_RECEIVER) @XmlElement(required=true, nillable=false) String tolist, + @WebParam(name = PARAM_SUBJECT) String subject, + @WebParam(name = PARAM_MESSAGE) String message); + + /** + * Simple mail send operation with sender, single receiver, subject and message + * including support for file attachments. + * + * @param mailhost connection details for the SMTP server to use + * @param from mail address to be used as sender + * @param tolist mail address of the receiver + * @param subject subject of the mail + * @param message mail body + * @param res attachments + * @return ReturnCode + */ + @WebMethod(operationName = "sendMailSimpleWithAttachment") + @WSDLDocumentation(value = "Send an email with attachment (simple).") + public ReturnCode sendMailSimpleWithAttachment( + @WebParam(name = PARAM_SMTPHOST) @XmlElement(required=true, nillable=false) HostConnection mailhost, + @WebParam(name = PARAM_SENDER) @XmlElement(required=true, nillable=false) String from, + @WebParam(name = PARAM_RECEIVER) @XmlElement(required=true, nillable=false) String tolist, + @WebParam(name = PARAM_SUBJECT) String subject, + @WebParam(name = PARAM_MESSAGE) String message, + @WebParam(name = PARAM_ATTACHMENTS) FileSetResource res); + + /** + * Send email with a lot of options + * + * @param mailhost connection details for the SMTP server to use + * @param from mail address to be used as sender + * @param tolist mail address of the receiver + * @param cclist mail carbon copy receiver + * @param bcclist mail blind carbon copy receiver + * @param subject subject of the mail + * @param mimetype message MIME type (i.e. text/plain) + * @param charset character set to use (i.e. utf-8, iso-8859-15) + * @param message mail body + * @param res attachments + * @param ssl use SSL + * @param tls use TLS + * @return ReturnCode + */ + @WebMethod(operationName = "sendMail") + @WSDLDocumentation(value = "Send an email (advanced).") + public ReturnCode sendMail( + @WebParam(name = PARAM_SMTPHOST) @XmlElement(required=true, nillable=false) HostConnection mailhost, + @WebParam(name = PARAM_SENDER) @XmlElement(required=true, nillable=false) String from, + @WebParam(name = PARAM_RECEIVER) @XmlElement(required=true, nillable=false) String tolist, + @WebParam(name = "cc") String cclist, + @WebParam(name = "bcc") String bcclist, + @WebParam(name = PARAM_SUBJECT) String subject, + @WebParam(name = "mimetype") MailMimeType mimetype, + @WebParam(name = "charset") String charset, + @WebParam(name = PARAM_MESSAGE) String message, + @WebParam(name = PARAM_ATTACHMENTS) FileSetResource res, + @WebParam(name = "useSSL") boolean ssl, + @WebParam(name = "useStartTLS") boolean tls); + + +} diff --git a/src/java/net/brutex/xservices/ws/MiscService.java b/src/java/net/brutex/xservices/ws/MiscService.java index f2843bf..d472b7e 100644 --- a/src/java/net/brutex/xservices/ws/MiscService.java +++ b/src/java/net/brutex/xservices/ws/MiscService.java @@ -30,6 +30,7 @@ import org.apache.cxf.aegis.type.java5.XmlReturnType; import org.apache.cxf.annotations.WSDLDocumentation; /** + * Bundles various methods * * @author Brian Rosenberger, bru@brutex.de * @since 0.4.0 @@ -38,9 +39,9 @@ import org.apache.cxf.annotations.WSDLDocumentation; @WSDLDocumentation("Various service operations.") public interface MiscService { - - - /** + /** + * Get IP address from host name. + * * @param hostname * @return ReturnCode */ @@ -49,78 +50,10 @@ public interface MiscService { public HostinfoType getHostinfo( @WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname); + /** - * - * @param mailhost - * @param from - * @param tolist - * @param subject - * @param message - * @return ReturnCode - */ - @WebMethod(operationName = "sendMailSimple") - @WSDLDocumentation(value = "Send an email (simple).") - public ReturnCode sendMailSimple( - @WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost, - @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from, - @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist, - @WebParam(name = "subject") String subject, - @WebParam(name = "message") String message); - - /** - * - * @param mailhost - * @param from - * @param tolist - * @param subject - * @param message - * @param res - * @return ReturnCode - */ - @WebMethod(operationName = "sendMailSimpleWithAttachment") - @WSDLDocumentation(value = "Send an email with attachment (simple).") - public ReturnCode sendMailSimpleWithAttachment( - @WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost, - @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from, - @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist, - @WebParam(name = "subject") String subject, - @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 ReturnCode - */ - @WebMethod(operationName = "sendMail") - @WSDLDocumentation(value = "Send an email (advanced).") - public ReturnCode sendMail( - @WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost, - @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from, - @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist, - @WebParam(name = "cc") String cclist, - @WebParam(name = "bcc") String bcclist, - @WebParam(name = "subject") String subject, - @WebParam(name = "mimetype") MailMimeType mimetype, - @WebParam(name = "charset") String charset, - @WebParam(name = "message") String message, - @WebParam(name = "attachments") FileSetResource res, - @WebParam(name = "useSSL") boolean ssl, - @WebParam(name = "useStartTLS") boolean tls); - - /** - * + * Delay execution for a given time. + * * @param minutes * @param seconds * @return ReturnCode diff --git a/src/java/net/brutex/xservices/ws/XServicesFault.java b/src/java/net/brutex/xservices/ws/XServicesFault.java index 514c59a..5343023 100644 --- a/src/java/net/brutex/xservices/ws/XServicesFault.java +++ b/src/java/net/brutex/xservices/ws/XServicesFault.java @@ -28,8 +28,10 @@ import javax.xml.ws.WebFault; import net.brutex.xservices.util.BrutexNamespaces; /** + * Generic web service fault. * * @author Brian Rosenberger, bru@brutex.de + * since 0.4.0 */ @WebFault(targetNamespace=BrutexNamespaces.WS_XSERVICES) public class XServicesFault extends Exception { diff --git a/src/java/net/brutex/xservices/ws/impl/MailServiceImpl.java b/src/java/net/brutex/xservices/ws/impl/MailServiceImpl.java new file mode 100644 index 0000000..a3a11a2 --- /dev/null +++ b/src/java/net/brutex/xservices/ws/impl/MailServiceImpl.java @@ -0,0 +1,94 @@ +/* + * Copyright 2012 Brian Rosenberger (Brutex Network) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.brutex.xservices.ws.impl; + +import javax.jws.WebService; + +import net.brutex.xservices.types.HostConnection; +import net.brutex.xservices.types.MailMimeType; +import net.brutex.xservices.types.ReturnCode; +import net.brutex.xservices.types.ant.FileSetResource; +import net.brutex.xservices.util.BrutexNamespaces; +import net.brutex.xservices.util.RunTask; +import net.brutex.xservices.ws.MailService; + +import org.apache.tools.ant.taskdefs.email.EmailTask; + +/** + * Implements MailService + * + * @author Brian Rosenberger, bru@brutex.de + */ +@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, + endpointInterface = "net.brutex.xservices.ws.MailService", + serviceName = "MailService") +public class MailServiceImpl implements MailService { + + + public ReturnCode sendMailSimple(HostConnection mailhost, String from, + String tolist, String subject, String message) { + return sendMail(from, from, tolist, "", "", subject, message, + "text/plain", null, mailhost.hostname, mailhost.port, + mailhost.user, mailhost.password, "utf-8", false, false); + } + + public ReturnCode sendMailSimpleWithAttachment(HostConnection mailhost, + String from, String tolist, String subject, String message, + FileSetResource res) { + return sendMail(from, from, tolist, "", "", subject, message, + "text/plain", res, mailhost.hostname, mailhost.port, + mailhost.user, mailhost.password, "utf-8", false, false); + } + + public ReturnCode sendMail(HostConnection mailhost, String from, + String tolist, String cclist, String bcclist, String subject, + MailMimeType mimetype, String charset, String message, + FileSetResource res, boolean ssl, boolean tls) { + return sendMail(from, from, tolist, cclist, bcclist, subject, message, + mimetype.value(), res, mailhost.hostname, mailhost.port, + mailhost.user, mailhost.password, charset, tls, ssl); + } + + private ReturnCode sendMail(String from, String replyto, String tolist, + String cclist, String bcclist, String subject, String message, + String messagemimetype, FileSetResource attachments, + String mailhost, int mailport, String user, String password, + String charset, boolean tls, boolean ssl) { + EmailTask mail = new EmailTask(); + mail.setTaskName("Mail"); + RunTask runner = new RunTask(mail); + mail.setFrom(from); + mail.setReplyTo(replyto); + mail.setToList(tolist); + mail.setCcList(cclist); + mail.setBccList(bcclist); + mail.setSubject(subject); + mail.setMessage(message); + mail.setMessageMimeType(messagemimetype); + if (attachments != null) { + mail.addFileset(attachments.getAntResource(mail.getProject())); + } + mail.setMailhost(mailhost); + mail.setMailport(mailport); + mail.setUser(user); + mail.setPassword(password); + mail.setCharset(charset); + mail.setSSL(ssl); + mail.setEnableStartTLS(tls); + return runner.postTask(); + } +} diff --git a/src/java/net/brutex/xservices/ws/impl/MiscServiceImpl.java b/src/java/net/brutex/xservices/ws/impl/MiscServiceImpl.java index 65a2c4f..99fc030 100644 --- a/src/java/net/brutex/xservices/ws/impl/MiscServiceImpl.java +++ b/src/java/net/brutex/xservices/ws/impl/MiscServiceImpl.java @@ -37,10 +37,13 @@ import org.apache.tools.ant.taskdefs.Sleep; import org.apache.tools.ant.taskdefs.email.EmailTask; /** + * Implements the web service * * @author Brian Rosenberger, bru@brutex.de */ -@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, endpointInterface = "net.brutex.xservices.ws.MiscService", serviceName = "MiscService") +@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, + endpointInterface = "net.brutex.xservices.ws.MiscService", + serviceName = "MiscService") public class MiscServiceImpl implements MiscService { public HostinfoType getHostinfo(String hostname) { @@ -49,6 +52,7 @@ public class MiscServiceImpl implements MiscService { RunTask runner = new RunTask(info); info.setHost(hostname); // info.setPrefix(prefix); + // TODO: Does not work for IP Addresses? ReturnCode ret = runner.postTask(); HostinfoType infotype = new HostinfoType( ret.getProperty("NAME"), diff --git a/web/WEB-INF/cxf-beans.xml b/web/WEB-INF/cxf-beans.xml index bac349a..1889b6b 100644 --- a/web/WEB-INF/cxf-beans.xml +++ b/web/WEB-INF/cxf-beans.xml @@ -47,7 +47,10 @@ implementor="net.brutex.xservices.ws.impl.JobServiceImpl" address="/JobService"> - + + +