From d917890b04308b6919a87ab831ad5efa177c9792 Mon Sep 17 00:00:00 2001 From: Brian Rosenberger Date: Sat, 31 Dec 2011 13:48:50 +0000 Subject: [PATCH] Tighten mail operations parameters with minOccurs="1" git-svn-id: https://brutex.net/svn/xservices/trunk@79 e7e49efb-446e-492e-b9ec-fcafc1997a86 --- .../net/brutex/xservices/ws/MiscService.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/java/net/brutex/xservices/ws/MiscService.java b/src/java/net/brutex/xservices/ws/MiscService.java index b84d5e4..c437501 100644 --- a/src/java/net/brutex/xservices/ws/MiscService.java +++ b/src/java/net/brutex/xservices/ws/MiscService.java @@ -60,9 +60,10 @@ public interface MiscService { */ @WebMethod(operationName = "sendMailSimple") @WSDLDocumentation(value = "Send an email (simple).") - public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost, - @WebParam(name = "from") String from, - @WebParam(name = "to") String tolist, + 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); @@ -78,9 +79,10 @@ public interface MiscService { */ @WebMethod(operationName = "sendMailSimpleWithAttachment") @WSDLDocumentation(value = "Send an email with attachment (simple).") - public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost, - @WebParam(name = "from") String from, - @WebParam(name = "to") String tolist, + 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); @@ -103,9 +105,10 @@ public interface MiscService { */ @WebMethod(operationName = "sendMail") @WSDLDocumentation(value = "Send an email (advanced).") - public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost, - @WebParam(name = "from") String from, - @WebParam(name = "to") String tolist, + 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, @@ -124,7 +127,8 @@ public interface MiscService { */ @WebMethod(operationName = "sleep") @WSDLDocumentation(value = "Delay request response a specified duration.") - public ReturnCode sleep(@WebParam(name = "minutes") int minutes, + public ReturnCode sleep( + @WebParam(name = "minutes") int minutes, @WebParam(name = "seconds") int seconds);