1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.miloss.fgsms.agents;
23
24 import org.apache.cxf.message.Message;
25 import org.apache.cxf.phase.Phase;
26
27
28
29
30
31 public class CXFInterceptorOutService extends org.apache.cxf.phase.AbstractPhaseInterceptor {
32
33 public CXFInterceptorOutService() {
34 super(Phase.POST_LOGICAL);
35 }
36
37 @Override
38 public void handleMessage(Message message) {
39 Boolean isclient = (Boolean) message.get("org.apache.cxf.client");
40 Boolean isinbound = (Boolean) message.get("org.apache.cxf.message.inbound");
41 if (isclient == null) {
42 isclient = false;
43 }
44 if (isinbound == null) {
45 isinbound = false;
46 }
47 if (isclient && !isinbound)
48 {
49 CXFCommonMessageHandler.ProcessRequest(message, true, this.getClass().getCanonicalName());
50 } else if (isclient && isinbound) {
51 CXFCommonMessageHandler.ProcessResponse(message, false, true, this.getClass().getCanonicalName());
52 } else {
53 CXFCommonMessageHandler.ProcessResponse(message, false, false, this.getClass().getCanonicalName());
54 }
55
56
57
58
59
60
61
62
63
64 }
65
66 @Override
67 public void handleFault(Message message) {
68
69
70
71
72
73 CXFCommonMessageHandler.ProcessResponse(message, false, true, this.getClass().getCanonicalName());
74
75
76
77 }
78 }