1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb.testclient1;
17
18 import org.apache.cxf.message.Message;
19 import org.apache.cxf.phase.PhaseInterceptorChain;
20 import org.kuali.rice.ksb.messaging.remotedservices.JaxWsEchoService;
21 import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
22
23 import javax.annotation.Resource;
24 import javax.jws.WebService;
25 import javax.xml.ws.WebServiceContext;
26 import javax.xml.ws.handler.MessageContext;
27 import java.util.List;
28 import java.util.Map;
29
30
31
32
33
34
35
36 @WebService(endpointInterface="org.kuali.rice.ksb.messaging.remotedservices.JaxWsEchoService",
37 serviceName="jaxwsEchoService",
38 portName="jaxWsEchoService",
39 targetNamespace="http://rice.kuali.org/")
40 public class JaxWsEchoServiceImpl implements JaxWsEchoService {
41 @Resource WebServiceContext requestContext;
42
43
44
45
46
47
48 public String doEcho(String inMsg) {
49
50 return inMsg;
51 }
52
53
54 public void captureHeaders() {
55 MessageContext mc = requestContext.getMessageContext();
56 ServiceCallInformationHolder.multiValues = (Map<String, List<String>>) PhaseInterceptorChain.getCurrentMessage().get(
57 Message.PROTOCOL_HEADERS);
58 }
59 }