01: package example;
02:
03: import javax.jws.WebMethod;
04: import javax.jws.WebService;
05:
06: @WebService
07: public class LogService {
08: private int _sequenceNumber = 1;
09: private StringBuilder _log = new StringBuilder();
10:
11: @WebMethod
12: public int log(String message) {
13: _log.append(_sequenceNumber + ": " + message + "\n");
14: return _sequenceNumber++;
15: }
16:
17: @WebMethod(exclude=true)
18: public String getLog() {
19: return _log.toString();
20: }
21: }
|