16,6 → 16,9 |
|
package net.brutex.xservices.ws.impl; |
|
import java.util.Enumeration; |
import java.util.Properties; |
|
import javax.jws.WebService; |
import net.brutex.xservices.types.FileSetResource; |
import net.brutex.xservices.types.HostConnection; |
50,7 → 53,29 |
public ReturnCode getHostinfo(String hostname) { |
return antGetHostinfo(hostname, null); |
} |
|
@WSDLDocumentation(value = "Get XService information.") |
public ReturnCode getInfo() { |
ReturnCode r = new ReturnCode(); |
r.returnCode = 0; |
// Get all system properties |
Properties props = System.getProperties(); |
|
// Enumerate all system properties |
Enumeration<String> e = (Enumeration<String>) props.propertyNames(); |
for (; e.hasMoreElements(); ) { |
// Get property name |
String propName = (String)e.nextElement(); |
|
// Get property value |
String propValue = (String)props.get(propName); |
r.stdOut = r.stdOut + propName + ": " + propValue + "\n"; |
} |
|
return r; |
} |
|
|
public ReturnCode sendMailSimple(HostConnection mailhost, String from, |
String tolist, String subject, String message) { |
return sendMail(from, from, tolist, "", "", subject, message, |
105,7 → 130,7 |
mail.setMessage(message); |
mail.setMessageMimeType(messagemimetype); |
if (attachments != null) { |
mail.addFileset(attachments.getAntFileSet(mail.getProject())); |
mail.addFileset(attachments.getAntResource(mail.getProject())); |
} |
mail.setMailhost(mailhost); |
mail.setMailport(mailport); |
128,5 → 153,4 |
sleep.setMilliseconds(milliseconds); |
return runner.postTask(); |
} |
|
} |