1 17 18 package org.apache.sandesha; 19 20 import org.apache.axis.AxisEngine; 21 import org.apache.axis.AxisFault; 22 import org.apache.axis.MessageContext; 23 import org.apache.axis.client.Call; 24 import org.apache.axis.client.Transport; 25 import org.apache.axis.transport.http.HTTPConstants; 26 27 34 public class RMTransport extends Transport { 35 36 private String action; 37 38 private String cookie; 39 40 private String cookie2; 41 42 public RMTransport() { 43 transportName = "RMTransport"; 44 } 45 46 public RMTransport(String url, String action) { 47 transportName = "RMTransport"; 48 this.url = url; 49 this.action = action; 50 51 } 52 53 public void setupMessageContextImpl(MessageContext mc, Call call, AxisEngine engine) 54 throws AxisFault { 55 if (action != null) { 56 mc.setUseSOAPAction(true); 57 mc.setSOAPActionURI(action); 58 } 59 60 if (cookie != null) 62 mc.setProperty(HTTPConstants.HEADER_COOKIE, cookie); 63 if (cookie2 != null) 64 mc.setProperty(HTTPConstants.HEADER_COOKIE2, cookie2); 65 66 if (mc.getService() == null) { 70 mc.setTargetService((String ) mc.getSOAPActionURI()); 71 } 72 } 73 74 public void processReturnedMessageContext(MessageContext context) { 75 cookie = context.getStrProp(HTTPConstants.HEADER_COOKIE); 76 cookie2 = context.getStrProp(HTTPConstants.HEADER_COOKIE2); 77 } 78 79 } | Popular Tags |