FileDocCategorySizeDatePackage
HTTPTransport.javaAPI DocApache Axis 1.43237Sat Apr 22 18:57:28 BST 2006org.apache.axis.transport.http

HTTPTransport

public class HTTPTransport extends org.apache.axis.client.Transport
Extends Transport by implementing the setupMessageContext function to set HTTP-specific message context fields and transport chains. May not even be necessary if we arrange things differently somehow. Can hold state relating to URL properties.
author
Rob Jellinghaus (robj@unrealities.com)
author
Doug Davis (dug@us.ibm.com)
author
Glen Daniels (gdaniels@allaire.com)

Fields Summary
public static final String
DEFAULT_TRANSPORT_NAME
public static final String
URL
HTTP properties
private Object
cookie
private Object
cookie2
private String
action
Constructors Summary
public HTTPTransport()

    
       
        transportName = DEFAULT_TRANSPORT_NAME;
    
public HTTPTransport(String url, String action)
helper constructor

        transportName = DEFAULT_TRANSPORT_NAME;
        this.url = url;
        this.action = action;
    
Methods Summary
public voidprocessReturnedMessageContext(org.apache.axis.MessageContext context)

        cookie = context.getProperty(HTTPConstants.HEADER_COOKIE);
        cookie2 = context.getProperty(HTTPConstants.HEADER_COOKIE2);
    
public voidsetupMessageContextImpl(org.apache.axis.MessageContext mc, org.apache.axis.client.Call call, org.apache.axis.AxisEngine engine)
Set up any transport-specific derived properties in the message context.

param
mc the context to set up
param
call the call (unused?)
param
engine the engine containing the registries
throws
AxisFault if service cannot be found

        if (action != null) {
            mc.setUseSOAPAction(true);
            mc.setSOAPActionURI(action);
        }

        // Set up any cookies we know about
        if (cookie != null)
            mc.setProperty(HTTPConstants.HEADER_COOKIE, cookie);
        if (cookie2 != null)
            mc.setProperty(HTTPConstants.HEADER_COOKIE2, cookie2);

        // Allow the SOAPAction to determine the service, if the service
        // (a) has not already been determined, and (b) if a service matching
        // the soap action has been deployed.
        if (mc.getService() == null) {
            mc.setTargetService( (String)mc.getSOAPActionURI() );
        }