Subversion Repositories XServices

Rev

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

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