Subversion Repositories XServices

Rev

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

Rev 70 Rev 72
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;
21
import net.brutex.xservices.types.FileSetResource;
22
import net.brutex.xservices.types.HostConnection;
22
import net.brutex.xservices.types.HostConnection;
23
import net.brutex.xservices.types.MailMimeType;
23
import net.brutex.xservices.types.MailMimeType;
24
import net.brutex.xservices.types.ReturnCode;
24
import net.brutex.xservices.types.ReturnCode;
25
import net.brutex.xservices.util.BrutexNamespaces;
25
import net.brutex.xservices.util.BrutexNamespaces;
26
import org.apache.cxf.annotations.WSDLDocumentation;
26
import org.apache.cxf.annotations.WSDLDocumentation;
-
 
27
import org.apache.cxf.annotations.WSDLDocumentationCollection;
27
 
28
 
28
/**
29
/**
29
 *
30
 *
30
 * @author Brian Rosenberger, bru@brutex.de
31
 * @author Brian Rosenberger, bru@brutex.de
31
 * @since 0.4.0
32
 * @since 0.4.0
32
 */
33
 */
33
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
34
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
-
 
35
@WSDLDocumentation("Various service operations.")
34
public interface MiscService {
36
public interface MiscService {
35
 
37
 
36
    
38
    
37
    
39
    
38
    /**
40
    /**
39
     * @param hostname
41
     * @param hostname
40
     * @return
42
     * @return ReturnCode
41
     */
43
     */
42
    @WebMethod(operationName = "getHostinfo")
44
    @WebMethod(operationName = "getHostinfo")
-
 
45
    @WSDLDocumentation(value = "Get information about a host.")
-
 
46
    public ReturnCode getHostinfo(
43
    public ReturnCode getHostinfo(@WebParam(name = "hostname") String hostname);
47
    		@WebParam(name = "hostname") String hostname);
44
 
48
 
45
    /**
49
    /**
46
     *
50
     *
47
     * @param mailhost
51
     * @param mailhost
48
     * @param from
52
     * @param from
49
     * @param tolist
53
     * @param tolist
50
     * @param subject
54
     * @param subject
51
     * @param message
55
     * @param message
52
     * @return
56
     * @return ReturnCode
53
     */
57
     */
54
    @WebMethod(operationName = "sendMailSimple")
58
    @WebMethod(operationName = "sendMailSimple")
-
 
59
    @WSDLDocumentation(value = "Send an email (simple).")
55
    public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
60
    public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
56
            @WebParam(name = "from") String from,
61
            @WebParam(name = "from") String from,
57
            @WebParam(name = "to") String tolist,
62
            @WebParam(name = "to") String tolist,
58
            @WebParam(name = "subject") String subject,
63
            @WebParam(name = "subject") String subject,
59
            @WebParam(name = "message") String message);
64
            @WebParam(name = "message") String message);
60
 
65
 
61
    /**
66
    /**
62
     *
67
     *
63
     * @param mailhost
68
     * @param mailhost
64
     * @param from
69
     * @param from
65
     * @param tolist
70
     * @param tolist
66
     * @param subject
71
     * @param subject
67
     * @param message
72
     * @param message
68
     * @param res
73
     * @param res
69
     * @return
74
     * @return ReturnCode
70
     */
75
     */
71
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
76
    @WebMethod(operationName = "sendMailSimpleWithAttachment")
-
 
77
    @WSDLDocumentation(value = "Send an email with attachment (simple).")
72
    public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
78
    public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
73
            @WebParam(name = "from") String from,
79
            @WebParam(name = "from") String from,
74
            @WebParam(name = "to") String tolist,
80
            @WebParam(name = "to") String tolist,
75
            @WebParam(name = "subject") String subject,
81
            @WebParam(name = "subject") String subject,
76
            @WebParam(name = "message") String message,
82
            @WebParam(name = "message") String message,
77
            @WebParam(name = "attachments") FileSetResource res);
83
            @WebParam(name = "attachments") FileSetResource res);
78
 
84
 
79
    /**
85
    /**
80
     *
86
     *
81
     * @param mailhost
87
     * @param mailhost
82
     * @param from
88
     * @param from
83
     * @param tolist
89
     * @param tolist
84
     * @param cclist
90
     * @param cclist
85
     * @param bcclist
91
     * @param bcclist
86
     * @param subject
92
     * @param subject
87
     * @param mimetype
93
     * @param mimetype
88
     * @param charset
94
     * @param charset
89
     * @param message
95
     * @param message
90
     * @param res
96
     * @param res
91
     * @param ssl
97
     * @param ssl
92
     * @param tls
98
     * @param tls
93
     * @return
99
     * @return ReturnCode
94
     */
100
     */
95
    @WebMethod(operationName = "sendMail")
101
    @WebMethod(operationName = "sendMail")
-
 
102
    @WSDLDocumentation(value = "Send an email (advanced).")
96
    public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost,
103
    public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost,
97
            @WebParam(name = "from") String from,
104
            @WebParam(name = "from") String from,
98
            @WebParam(name = "to") String tolist,
105
            @WebParam(name = "to") String tolist,
99
            @WebParam(name = "cc") String cclist,
106
            @WebParam(name = "cc") String cclist,
100
            @WebParam(name = "bcc") String bcclist,
107
            @WebParam(name = "bcc") String bcclist,
101
            @WebParam(name = "subject") String subject,
108
            @WebParam(name = "subject") String subject,
102
            @WebParam(name = "mimetype") MailMimeType mimetype,
109
            @WebParam(name = "mimetype") MailMimeType mimetype,
103
            @WebParam(name = "charset") String charset,
110
            @WebParam(name = "charset") String charset,
104
            @WebParam(name = "message") String message,
111
            @WebParam(name = "message") String message,
105
            @WebParam(name = "attachments") FileSetResource res,
112
            @WebParam(name = "attachments") FileSetResource res,
106
            @WebParam(name = "useSSL") boolean ssl,
113
            @WebParam(name = "useSSL") boolean ssl,
107
            @WebParam(name = "useStartTLS") boolean tls);
114
            @WebParam(name = "useStartTLS") boolean tls);
108
 
115
 
109
    /**
116
    /**
110
     *
117
     *
111
     * @param minutes
118
     * @param minutes
112
     * @param seconds
119
     * @param seconds
113
     * @return
120
     * @return ReturnCode
114
     */
121
     */
115
    @WebMethod(operationName = "sleep")
122
    @WebMethod(operationName = "sleep")
-
 
123
    @WSDLDocumentation(value = "Delay request response a specified duration.")
116
    public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
124
    public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
117
            @WebParam(name = "seconds") int seconds);
125
            @WebParam(name = "seconds") int seconds);
118
    
126
    
-
 
127
    
-
 
128
    /**
-
 
129
     * @return ReturnCode
119
    
130
     */
-
 
131
    @WebMethod(operationName = "getInfo")
120
    @WebMethod(operationName = "getInfo")
132
    @WSDLDocumentation(value = "Get XService information.")
121
    public ReturnCode getInfo();
133
    public ReturnCode getInfo();
122
    
134
    
123
}
135
}