Subversion Repositories XServices

Rev

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

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