1 8 9 package test.wsdl.stubheaders; 10 11 import org.apache.axis.MessageContext; 12 import org.apache.axis.message.SOAPEnvelope; 13 import org.apache.axis.message.SOAPHeaderElement; 14 15 public class StubHeaderImpl implements test.wsdl.stubheaders.StubHeaderInterface { 16 17 public java.lang.String echo(java.lang.String in) throws java.rmi.RemoteException { 18 String ret = null; 19 MessageContext mc = MessageContext.getCurrentContext(); 20 21 SOAPEnvelope env = mc.getRequestMessage().getSOAPEnvelope(); 23 SOAPHeaderElement header = env.getHeaderByName("http://test.org/inputheader", "headerin"); 24 if (header != null) 25 { 26 ret = header.getObjectValue().toString(); 27 } 28 29 env = mc.getResponseMessage().getSOAPEnvelope(); 31 SOAPHeaderElement hdr = 32 new SOAPHeaderElement("http://test.org/outputheader", "headerout", "outputvalue"); 33 env.addHeader(hdr); 34 35 return ret; 37 } 38 39 } 40 | Popular Tags |