01: package org.objectweb.celtix.systest.ws.addressing.jms;
02:
03: import javax.annotation.Resource;
04: import javax.jws.WebService;
05: import javax.xml.ws.WebServiceContext;
06:
07: import org.objectweb.celtix.hello_world_jms.HelloWorldPortType;
08: import org.objectweb.celtix.systest.ws.addressing.VerificationCache;
09: import org.objectweb.celtix.ws.addressing.AddressingProperties;
10:
11: import static org.objectweb.celtix.ws.addressing.JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
12:
13: @WebService(serviceName="JMSSOAPServiceAddressing",portName="HWJMSAddressingPort",endpointInterface="org.objectweb.celtix.hello_world_jms.HelloWorldPortType",targetNamespace="http://celtix.objectweb.org/hello_world_jms")
14: public class GreeterImpl implements HelloWorldPortType {
15: VerificationCache verificationCache;
16:
17: /**
18: * Injectable context.
19: */
20: @Resource
21: private WebServiceContext context;
22:
23: public String greetMe(String me) {
24: verifyMAPs();
25: return "Hello " + me;
26: }
27:
28: public void greetMeOneWay(String requestType) {
29: verifyMAPs();
30: }
31:
32: public String sayHi() {
33: verifyMAPs();
34: return "Bonjour";
35: }
36:
37: private void verifyMAPs() {
38: String property = SERVER_ADDRESSING_PROPERTIES_INBOUND;
39: AddressingProperties maps = (AddressingProperties) context
40: .getMessageContext().get(property);
41: verificationCache.put(MAPTest.verifyMAPs(maps, this));
42: }
43:
44: }
|