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 javax.annotation.Resource;
19 import javax.jws.WebService;
20 import javax.ws.rs.core.Context;
21 import javax.ws.rs.core.HttpHeaders;
22 import javax.xml.ws.WebServiceContext;
23 import javax.xml.ws.handler.MessageContext;
24
25 import org.apache.cxf.message.Message;
26 import org.apache.cxf.phase.PhaseInterceptorChain;
27 import org.kuali.rice.ksb.messaging.remotedservices.JaxWsEchoService;
28 import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
29
30 import java.util.List;
31 import java.util.Map;
32
33
34
35
36
37
38
39 @WebService(endpointInterface="org.kuali.rice.ksb.messaging.remotedservices.JaxWsEchoService",
40 serviceName="jaxwsEchoService",
41 portName="jaxWsEchoService",
42 targetNamespace="http://rice.kuali.org/")
43 public class JaxWsEchoServiceImpl implements JaxWsEchoService {
44 @Resource WebServiceContext requestContext;
45
46
47
48
49
50
51 public String doEcho(String inMsg) {
52
53 return inMsg;
54 }
55
56
57 public void captureHeaders() {
58 MessageContext mc = (MessageContext) requestContext.getMessageContext();
59 ServiceCallInformationHolder.stuff.put("capturedHeaders", mc.get(MessageContext.HTTP_REQUEST_HEADERS));
60 }
61 }