1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ken.service.impl;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
20 import org.kuali.rice.ken.api.service.KENServiceConstants;
21 import org.kuali.rice.ken.api.service.SendNotificationService;
22 import org.kuali.rice.ken.bo.NotificationResponse;
23 import org.kuali.rice.ken.service.NotificationService;
24 import org.kuali.rice.ken.util.NotificationConstants;
25 import org.kuali.rice.kew.api.WorkflowRuntimeException;
26 import org.kuali.rice.kim.api.KimApiConstants;
27 import org.kuali.rice.ksb.messaging.service.KSBXMLService;
28
29 import javax.jws.WebMethod;
30 import javax.jws.WebParam;
31 import javax.jws.WebService;
32 import javax.jws.soap.SOAPBinding;
33
34
35
36
37
38
39 public class SendNotificationServiceKewXmlImpl implements SendNotificationService {
40 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
41 .getLogger(SendNotificationServiceKewXmlImpl.class);
42
43 private final NotificationService notificationService;
44
45
46
47
48
49 public SendNotificationServiceKewXmlImpl(NotificationService notificationService) {
50 this.notificationService = notificationService;
51 }
52
53
54
55
56
57
58 @Override
59 public void invoke(String message) {
60 if (StringUtils.isBlank(message)) {
61 throw new RiceIllegalArgumentException("xml is null or blank");
62 }
63
64 try {
65 NotificationResponse response = notificationService.sendNotification(message);
66 LOG.info(response.getMessage());
67 } catch (Exception e) {
68 throw new WorkflowRuntimeException(e);
69 }
70 }
71 }