Subversion Repositories XServices

Rev

Rev 81 | Rev 85 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81 Rev 83
1
/*
1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
6
 *   You may obtain a copy of the License at
7
 *
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
14
 *   limitations under the License.
15
 */
15
 */
16
package net.brutex.xservices.ws;
16
package net.brutex.xservices.ws;
17
 
17
 
18
import javax.jws.WebMethod;
18
import javax.jws.WebMethod;
19
import javax.jws.WebParam;
19
import javax.jws.WebParam;
20
import javax.jws.WebService;
20
import javax.jws.WebService;
21
import net.brutex.xservices.types.FileSetResource;
-
 
22
import net.brutex.xservices.types.HostConnection;
21
import net.brutex.xservices.types.HostConnection;
23
import net.brutex.xservices.types.HostinfoType;
22
import net.brutex.xservices.types.HostinfoType;
24
import net.brutex.xservices.types.MailMimeType;
23
import net.brutex.xservices.types.MailMimeType;
25
import net.brutex.xservices.types.ReturnCode;
24
import net.brutex.xservices.types.ReturnCode;
-
 
25
import net.brutex.xservices.types.ant.FileSetResource;
26
import net.brutex.xservices.util.BrutexNamespaces;
26
import net.brutex.xservices.util.BrutexNamespaces;
27
 
27
 
28
import org.apache.cxf.aegis.type.java5.XmlElement;
28
import org.apache.cxf.aegis.type.java5.XmlElement;
-
 
29
import org.apache.cxf.aegis.type.java5.XmlReturnType;
29
import org.apache.cxf.annotations.WSDLDocumentation;
30
import org.apache.cxf.annotations.WSDLDocumentation;
30
 
31
 
31
/**
32
/**
32
 *
33
 *
33
 * @author Brian Rosenberger, bru@brutex.de
34
 * @author Brian Rosenberger, bru@brutex.de
34
 * @since 0.4.0
35
 * @since 0.4.0
35
 */
36
 */
36
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
37
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
37
@WSDLDocumentation("Various service operations.")
38
@WSDLDocumentation("Various service operations.")
38
public interface MiscService {
39
public interface MiscService {
39
 
40
 
40
    
41
    
41
    
42
    
42
    /**
43
    /**
43
     * @param hostname
44
     * @param hostname
44
     * @return ReturnCode
45
     * @return ReturnCode
45
     */
46
     */
46
    @WebMethod(operationName = "getHostinfo")
47
    @WebMethod(operationName = "getHostinfo")
47
    @WSDLDocumentation(value = "Get information about a host.")
48
    @WSDLDocumentation(value = "Get information about a host.")
48
    public HostinfoType getHostinfo(
49
    public HostinfoType getHostinfo(
49
    		@WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname);
50
    		@WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname);
50
 
51
 
51
    /**
52
    /**
52
     *
53
     *
53
     * @param mailhost
54
     * @param mailhost
54
     * @param from
55
     * @param from
55
     * @param tolist
56
     * @param tolist
56
     * @param subject
57
     * @param subject
57
     * @param message
58
     * @param message
58
     * @return ReturnCode
59
     * @return ReturnCode
59
     */
60
     */
60
    @WebMethod(operationName = "sendMailSimple")
61
    @WebMethod(operationName = "sendMailSimple")
61
    @WSDLDocumentation(value = "Send an email (simple).")
62
    @WSDLDocumentation(value = "Send an email (simple).")
62
    public ReturnCode sendMailSimple(
63
    public ReturnCode sendMailSimple(
63
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
64
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
64
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
65
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
65
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
66
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
66
            @WebParam(name = "subject") String subject,
67
            @WebParam(name = "subject") String subject,
67
            @WebParam(name = "message") String message);
68
            @WebParam(name = "message") String message);
68
 
69
 
69
    /**
70
    /**
70
     *
71
     *
71
     * @param mailhost
72
     * @param mailhost
72
     * @param from
73
     * @param from
73
     * @param tolist
74
     * @param tolist
74
     * @param subject
75
     * @param subject
75
     * @param message
76
     * @param message
76
     * @param res
77
     * @param res
77
     * @return ReturnCode
78
     * @return ReturnCode
78
     */
79
     */
79
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
80
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
80
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
81
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
81
    public ReturnCode sendMailSimpleWithAttachment(
82
    public ReturnCode sendMailSimpleWithAttachment(
82
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
83
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
83
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
84
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
84
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
85
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
85
            @WebParam(name = "subject") String subject,
86
            @WebParam(name = "subject") String subject,
86
            @WebParam(name = "message") String message,
87
            @WebParam(name = "message") String message,
87
            @WebParam(name = "attachments") FileSetResource res);
88
            @WebParam(name = "attachments") FileSetResource res);
88
 
89
 
89
    /**
90
    /**
90
     *
91
     *
91
     * @param mailhost
92
     * @param mailhost
92
     * @param from
93
     * @param from
93
     * @param tolist
94
     * @param tolist
94
     * @param cclist
95
     * @param cclist
95
     * @param bcclist
96
     * @param bcclist
96
     * @param subject
97
     * @param subject
97
     * @param mimetype
98
     * @param mimetype
98
     * @param charset
99
     * @param charset
99
     * @param message
100
     * @param message
100
     * @param res
101
     * @param res
101
     * @param ssl
102
     * @param ssl
102
     * @param tls
103
     * @param tls
103
     * @return ReturnCode
104
     * @return ReturnCode
104
     */
105
     */
105
    @WebMethod(operationName = "sendMail")
106
    @WebMethod(operationName = "sendMail")
106
    @WSDLDocumentation(value = "Send an email (advanced).")
107
    @WSDLDocumentation(value = "Send an email (advanced).")
107
    public ReturnCode sendMail(
108
    public ReturnCode sendMail(
108
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
109
    		@WebParam(name = "mailhost") @XmlElement(minOccurs="1", nillable=false) HostConnection mailhost,
109
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
110
            @WebParam(name = "from") @XmlElement(minOccurs="1", nillable=false) String from,
110
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
111
            @WebParam(name = "to") @XmlElement(minOccurs="1", nillable=false) String tolist,
111
            @WebParam(name = "cc") String cclist,
112
            @WebParam(name = "cc") String cclist,
112
            @WebParam(name = "bcc") String bcclist,
113
            @WebParam(name = "bcc") String bcclist,
113
            @WebParam(name = "subject") String subject,
114
            @WebParam(name = "subject") String subject,
114
            @WebParam(name = "mimetype") MailMimeType mimetype,
115
            @WebParam(name = "mimetype") MailMimeType mimetype,
115
            @WebParam(name = "charset") String charset,
116
            @WebParam(name = "charset") String charset,
116
            @WebParam(name = "message") String message,
117
            @WebParam(name = "message") String message,
117
            @WebParam(name = "attachments") FileSetResource res,
118
            @WebParam(name = "attachments") FileSetResource res,
118
            @WebParam(name = "useSSL") boolean ssl,
119
            @WebParam(name = "useSSL") boolean ssl,
119
            @WebParam(name = "useStartTLS") boolean tls);
120
            @WebParam(name = "useStartTLS") boolean tls);
120
 
121
 
121
    /**
122
    /**
122
     *
123
     *
123
     * @param minutes
124
     * @param minutes
124
     * @param seconds
125
     * @param seconds
125
     * @return ReturnCode
126
     * @return ReturnCode
126
     */
127
     */
127
    @WebMethod(operationName = "sleep")
128
    @WebMethod(operationName = "sleep")
128
    @WSDLDocumentation(value = "Delay request response a specified duration.")
129
    @WSDLDocumentation(value = "Delay request response a specified duration.")
129
    public ReturnCode sleep(
130
    public ReturnCode sleep(
130
    		@WebParam(name = "minutes") int minutes,
131
    		@WebParam(name = "minutes") int minutes,
131
            @WebParam(name = "seconds") int seconds);
132
            @WebParam(name = "seconds") int seconds);
132
    
133
    
133
    
134
    
134
    /**
135
    /**
135
     * @return ReturnCode
136
     * @return ReturnCode
136
     */
137
     */
137
    @WebMethod(operationName = "getInfo")
138
    @WebMethod(operationName = "getInfo")
138
    @WSDLDocumentation(value = "Get XService information.")
139
    @WSDLDocumentation(value = "Get XService information.")
139
    public ReturnCode getInfo();
140
    public ReturnCode getInfo();
140
    
141
    
141
    /**
142
    /**
142
     * Generate a UUID
143
     * Generate a UUID
143
     * @return new UUID
144
     * @return new UUID
144
     */
145
     */
145
    @WebMethod(operationName = "generateUUID")
146
    @WebMethod(operationName = "generateUUID")
146
    @WSDLDocumentation(value = "Generate a UUID.")
147
    @WSDLDocumentation(value = "Generate a UUID.")
147
    public String generateUUID();
148
    public String generateUUID();
148
    
149
    
149
}
150
}