1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.miloss.fgsms.plugins.sla.alertservice;
22
23 import javax.jws.Oneway;
24 import javax.jws.WebMethod;
25 import javax.jws.WebParam;
26 import javax.jws.WebService;
27 import javax.xml.bind.annotation.XmlSeeAlso;
28 import java.util.Calendar;
29 import javax.xml.ws.RequestWrapper;
30 import org.apache.log4j.Level;
31 import org.miloss.fgsms.common.Logger;;
32
33 @WebService(name = "AlertRecieverPortType", targetNamespace = "urn:mil:army:cerdec:fgsms:plugins:sla:alertservice")
34 @XmlSeeAlso({
35 ObjectFactory.class
36 })
37 public class AlertRecieverTestImpl {
38
39 static final Logger log = Logger.getLogger("RecieverServiceAlertsSample");
40 public static int count=0;
41
42
43
44
45
46 @WebMethod(operationName = "RecieveServiceAlert", action = "urn:RecieveServiceAlert")
47 @Oneway
48 @RequestWrapper(localName = "RecieveServiceAlert", targetNamespace = "urn:mil:army:cerdec:fgsms:plugins:sla:alertservice", className = "mil.army.cerdec.fgsms.plugins.sla.alertservice.RecieveServiceAlert")
49 public void recieveServiceAlert(
50 @WebParam(name = "utcdatetime", targetNamespace = "urn:mil:army:cerdec:fgsms:plugins:sla:alertservice") Calendar timestamp,
51 @WebParam(name = "message", targetNamespace = "urn:mil:army:cerdec:fgsms:plugins:sla:alertservice") String message) {
52 count++;
53 if (timestamp != null) {
54 log.log(Level.WARN, "Alert Recieved " + timestamp.toString() + " " + message);
55 } else {
56 log.log(Level.WARN, "Alert Recieved " + " null timestamp " + " " + message);
57 }
58 }
59 }