1 package org.objectweb.celtix.systest.ws.addressing.jms; 2 3 import javax.annotation.Resource; 4 import javax.jws.WebService; 5 import javax.xml.ws.WebServiceContext; 6 7 import org.objectweb.celtix.hello_world_jms.HelloWorldPortType; 8 import org.objectweb.celtix.systest.ws.addressing.VerificationCache; 9 import org.objectweb.celtix.ws.addressing.AddressingProperties; 10 11 12 import static org.objectweb.celtix.ws.addressing.JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND; 13 14 15 @WebService(serviceName = "JMSSOAPServiceAddressing", 16 portName = "HWJMSAddressingPort", 17 endpointInterface = "org.objectweb.celtix.hello_world_jms.HelloWorldPortType", 18 targetNamespace = "http://celtix.objectweb.org/hello_world_jms") 19 public class GreeterImpl implements HelloWorldPortType { 20 VerificationCache verificationCache; 21 22 25 @Resource 26 private WebServiceContext context; 27 28 29 public String greetMe(String me) { 30 verifyMAPs(); 31 return "Hello " + me; 32 } 33 34 public void greetMeOneWay(String requestType) { 35 verifyMAPs(); 36 } 37 38 public String sayHi() { 39 verifyMAPs(); 40 return "Bonjour"; 41 } 42 43 private void verifyMAPs() { 44 String property = SERVER_ADDRESSING_PROPERTIES_INBOUND; 45 AddressingProperties maps = (AddressingProperties) 46 context.getMessageContext().get(property); 47 verificationCache.put(MAPTest.verifyMAPs(maps, this)); 48 } 49 50 } 51 | Popular Tags |