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.ReturnCode;
|
24 |
import net.brutex.xservices.types.ReturnCode;
|
24 |
import net.brutex.xservices.util.BrutexNamespaces;
|
25 |
import net.brutex.xservices.util.BrutexNamespaces;
|
25 |
|
26 |
|
26 |
/**
|
27 |
/**
|
27 |
*
|
28 |
*
|
28 |
* @author Brian Rosenberger, bru@brutex.de
|
29 |
* @author Brian Rosenberger, bru@brutex.de
|
29 |
*/
|
30 |
*/
|
30 |
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
|
31 |
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
|
31 |
public interface MiscService {
|
32 |
public interface MiscService {
|
32 |
|
33 |
|
33 |
@WebMethod(operationName = "getHostinfo")
|
34 |
@WebMethod(operationName = "getHostinfo")
|
34 |
public ReturnCode getHostinfo(@WebParam(name = "hostname") String hostname);
|
35 |
public ReturnCode getHostinfo(@WebParam(name = "hostname") String hostname);
|
35 |
|
36 |
|
36 |
@WebMethod(operationName = "sendMailSimple")
|
37 |
@WebMethod(operationName = "sendMailSimple")
|
37 |
public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
|
38 |
public ReturnCode sendMailSimple(@WebParam(name = "mailhost") HostConnection mailhost,
|
38 |
@WebParam(name = "from") String from,
|
39 |
@WebParam(name = "from") String from,
|
39 |
@WebParam(name = "to") String tolist,
|
40 |
@WebParam(name = "to") String tolist,
|
40 |
@WebParam(name = "subject") String subject,
|
41 |
@WebParam(name = "subject") String subject,
|
41 |
@WebParam(name = "message") String message);
|
42 |
@WebParam(name = "message") String message);
|
42 |
|
43 |
|
43 |
@WebMethod(operationName = "sendMailSimpleWithAttachment")
|
44 |
@WebMethod(operationName = "sendMailSimpleWithAttachment")
|
44 |
public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
|
45 |
public ReturnCode sendMailSimpleWithAttachment(@WebParam(name = "mailhost") HostConnection mailhost,
|
45 |
@WebParam(name = "from") String from,
|
46 |
@WebParam(name = "from") String from,
|
46 |
@WebParam(name = "to") String tolist,
|
47 |
@WebParam(name = "to") String tolist,
|
47 |
@WebParam(name = "subject") String subject,
|
48 |
@WebParam(name = "subject") String subject,
|
48 |
@WebParam(name = "message") String message,
|
49 |
@WebParam(name = "message") String message,
|
49 |
@WebParam(name = "attachments") FileSetResource res);
|
50 |
@WebParam(name = "attachments") FileSetResource res);
|
- |
|
51 |
|
- |
|
52 |
@WebMethod(operationName = "sendMail")
|
- |
|
53 |
public ReturnCode sendMail(@WebParam(name = "mailhost") HostConnection mailhost,
|
- |
|
54 |
@WebParam(name = "from") String from,
|
- |
|
55 |
@WebParam(name = "to") String tolist,
|
- |
|
56 |
@WebParam(name = "cc") String cclist,
|
- |
|
57 |
@WebParam(name = "bcc") String bcclist,
|
- |
|
58 |
@WebParam(name = "subject") String subject,
|
- |
|
59 |
@WebParam(name = "mimetype") MailMimeType mimetype,
|
- |
|
60 |
@WebParam(name = "charset") String charset,
|
- |
|
61 |
@WebParam(name = "message") String message,
|
- |
|
62 |
@WebParam(name = "attachments") FileSetResource res,
|
- |
|
63 |
@WebParam(name = "useSSL") boolean ssl,
|
- |
|
64 |
@WebParam(name = "useStartTLS") boolean tls);
|
50 |
|
65 |
|
51 |
@WebMethod(operationName = "sleep")
|
66 |
@WebMethod(operationName = "sleep")
|
52 |
public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
|
67 |
public ReturnCode sleep(@WebParam(name = "minutes") int minutes,
|
53 |
@WebParam(name = "seconds") int seconds);
|
68 |
@WebParam(name = "seconds") int seconds);
|
54 |
}
|
69 |
}
|