org.apache.axis2.transport.http
Class AbstractHTTPSender

java.lang.Object
  extended byorg.apache.axis2.transport.http.AbstractHTTPSender
Direct Known Subclasses:
HTTPSender

public abstract class AbstractHTTPSender
extends java.lang.Object


Field Summary
protected static java.lang.String ANONYMOUS
           
protected  boolean chunked
           
protected  org.apache.axiom.om.OMOutputFormat format
           
protected  java.lang.String httpVersion
           
protected  boolean isAllowedRetry
          isAllowedRetry will be using to check where the retry should be allowed or not.
protected static java.lang.String PROTOCOL_HTTP
           
protected static java.lang.String PROTOCOL_HTTPS
           
protected static java.lang.String PROXY_HOST_NAME
           
protected static java.lang.String PROXY_PORT
           
protected  TransportOutDescription proxyOutSetting
          proxydiscription
 
Constructor Summary
AbstractHTTPSender()
           
 
Method Summary
 void addCustomHeaders(org.apache.commons.httpclient.HttpMethod method, MessageContext msgContext)
           
protected  void configProxyAuthentication(org.apache.commons.httpclient.HttpClient client, TransportOutDescription proxySetting, org.apache.commons.httpclient.HostConfiguration config, MessageContext msgCtx)
          Helper method to Proxy and NTLM authentication
protected  void executeMethod(org.apache.commons.httpclient.HttpClient httpClient, MessageContext msgContext, java.net.URL url, org.apache.commons.httpclient.HttpMethod method)
           
protected  org.apache.commons.httpclient.HostConfiguration getHostConfiguration(org.apache.commons.httpclient.HttpClient client, MessageContext msgCtx, java.net.URL targetURL)
          getting host configuration to support standard http/s, proxy and NTLM support
protected  org.apache.commons.httpclient.HttpClient getHttpClient(MessageContext msgContext)
           
protected  void getTimeoutValues(MessageContext msgContext)
          This is used to get the dynamically set time out values from the message context.
protected  boolean isAuthenticationEnabled(MessageContext msgCtx)
           
protected  void obtainHTTPHeaderInformation(org.apache.commons.httpclient.HttpMethodBase method, MessageContext msgContext)
          Collect the HTTP header information and set them in the message context
protected  void processResponse(org.apache.commons.httpclient.HttpMethodBase httpMethod, MessageContext msgContext)
           
abstract  void send(MessageContext msgContext, java.net.URL url, java.lang.String soapActionString)
           
protected  void setAuthenticationInfo(org.apache.commons.httpclient.HttpClient agent, MessageContext msgCtx, org.apache.commons.httpclient.HostConfiguration config)
           
 void setChunked(boolean chunked)
           
 void setFormat(org.apache.axiom.om.OMOutputFormat format)
           
 void setHttpVersion(java.lang.String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANONYMOUS

protected static final java.lang.String ANONYMOUS
See Also:
Constant Field Values

PROXY_HOST_NAME

protected static final java.lang.String PROXY_HOST_NAME
See Also:
Constant Field Values

PROXY_PORT

protected static final java.lang.String PROXY_PORT
See Also:
Constant Field Values

chunked

protected boolean chunked

httpVersion

protected java.lang.String httpVersion

PROTOCOL_HTTP

protected static final java.lang.String PROTOCOL_HTTP
See Also:
Constant Field Values

PROTOCOL_HTTPS

protected static final java.lang.String PROTOCOL_HTTPS
See Also:
Constant Field Values

proxyOutSetting

protected TransportOutDescription proxyOutSetting
proxydiscription


format

protected org.apache.axiom.om.OMOutputFormat format

isAllowedRetry

protected boolean isAllowedRetry
isAllowedRetry will be using to check where the retry should be allowed or not.

Constructor Detail

AbstractHTTPSender

public AbstractHTTPSender()
Method Detail

setChunked

public void setChunked(boolean chunked)

setHttpVersion

public void setHttpVersion(java.lang.String version)
                    throws AxisFault
Throws:
AxisFault

configProxyAuthentication

protected void configProxyAuthentication(org.apache.commons.httpclient.HttpClient client,
                                         TransportOutDescription proxySetting,
                                         org.apache.commons.httpclient.HostConfiguration config,
                                         MessageContext msgCtx)
                                  throws AxisFault
Helper method to Proxy and NTLM authentication

Parameters:
client -
proxySetting -
config -
Throws:
AxisFault

obtainHTTPHeaderInformation

protected void obtainHTTPHeaderInformation(org.apache.commons.httpclient.HttpMethodBase method,
                                           MessageContext msgContext)
                                    throws AxisFault
Collect the HTTP header information and set them in the message context

Parameters:
method -
msgContext -
Throws:
AxisFault

processResponse

protected void processResponse(org.apache.commons.httpclient.HttpMethodBase httpMethod,
                               MessageContext msgContext)
                        throws java.io.IOException
Throws:
java.io.IOException

send

public abstract void send(MessageContext msgContext,
                          java.net.URL url,
                          java.lang.String soapActionString)
                   throws AxisFault,
                          java.io.IOException
Throws:
AxisFault
java.io.IOException

getHostConfiguration

protected org.apache.commons.httpclient.HostConfiguration getHostConfiguration(org.apache.commons.httpclient.HttpClient client,
                                                                               MessageContext msgCtx,
                                                                               java.net.URL targetURL)
                                                                        throws AxisFault
getting host configuration to support standard http/s, proxy and NTLM support

Throws:
AxisFault

isAuthenticationEnabled

protected boolean isAuthenticationEnabled(MessageContext msgCtx)

setAuthenticationInfo

protected void setAuthenticationInfo(org.apache.commons.httpclient.HttpClient agent,
                                     MessageContext msgCtx,
                                     org.apache.commons.httpclient.HostConfiguration config)
                              throws AxisFault
Throws:
AxisFault

getTimeoutValues

protected void getTimeoutValues(MessageContext msgContext)
This is used to get the dynamically set time out values from the message context. If the values are not available or invalid then teh default values or the values set by teh configuration will be used

Parameters:
msgContext -

setFormat

public void setFormat(org.apache.axiom.om.OMOutputFormat format)

getHttpClient

protected org.apache.commons.httpclient.HttpClient getHttpClient(MessageContext msgContext)

executeMethod

protected void executeMethod(org.apache.commons.httpclient.HttpClient httpClient,
                             MessageContext msgContext,
                             java.net.URL url,
                             org.apache.commons.httpclient.HttpMethod method)
                      throws java.io.IOException
Throws:
java.io.IOException

addCustomHeaders

public void addCustomHeaders(org.apache.commons.httpclient.HttpMethod method,
                             MessageContext msgContext)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.