1 9 package org.jboss.net.axis.transport.mailto.client; 10 11 import java.net.MalformedURLException ; 12 import java.net.URL ; 13 14 import org.apache.axis.AxisEngine; 15 import org.apache.axis.AxisFault; 16 import org.apache.axis.MessageContext; 17 import org.apache.axis.client.Call; 18 import org.apache.axis.client.Transport; 19 21 31 public class MailTransport extends Transport 32 { 33 public static final String DEFAULT_TRANSPORT_NAME = "mailto"; 34 38 46 53 public MailTransport() 54 { 55 transportName = DEFAULT_TRANSPORT_NAME; 56 } 57 58 61 public void processReturnedMessageContext(MessageContext context) 62 { 63 } 65 66 69 public void setUrl(String url) 70 { 71 try 72 { 73 URL mailto = new URL (url); 74 this.transportName = mailto.getProtocol(); 75 this.url = mailto.toExternalForm(); 77 } 78 catch(MalformedURLException e) 79 { 80 this.url = url; 82 } 83 } 84 85 public void setupMessageContextImpl(MessageContext msgCtx, Call call, AxisEngine engine) throws AxisFault 86 { 87 super.setupMessageContextImpl(msgCtx, call, engine); 88 89 96 102 if (msgCtx.getService() == null) 105 { 106 msgCtx.setTargetService(msgCtx.getSOAPActionURI()); 107 } 108 109 } 110 111 141 } | Popular Tags |