org.apache.axis2.transport.http
Class AbstractHTTPSender

java.lang.Object
  extended by org.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 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 initializeTimeouts(MessageContext msgContext, org.apache.commons.httpclient.HttpClient httpClient)
          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  MessageFormatter populateCommonProperties(MessageContext msgContext, java.net.URL url, org.apache.commons.httpclient.HttpMethodBase httpMethod, org.apache.commons.httpclient.HttpClient httpClient, java.lang.String soapActionString)
          Method used to copy all the common properties
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

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 - HttpMethodBase from which to get information
msgContext - the MessageContext in which to place the information... OR NOT!
Throws:
AxisFault - if problems occur

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 java.io.IOException
Throws:
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

Parameters:
client - active HttpClient
msgCtx - active MessageContext
targetURL - the target URL
Returns:
a HostConfiguration set up with proxy information
Throws:
AxisFault - if problems occur

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

populateCommonProperties

protected MessageFormatter populateCommonProperties(MessageContext msgContext,
                                                    java.net.URL url,
                                                    org.apache.commons.httpclient.HttpMethodBase httpMethod,
                                                    org.apache.commons.httpclient.HttpClient httpClient,
                                                    java.lang.String soapActionString)
                                             throws AxisFault
Method used to copy all the common properties

Parameters:
msgContext - - The messageContext of the request message
url - - The target URL
httpMethod - - The http method used to send the request
httpClient - - The httpclient used to send the request
soapActionString - - The soap action atring of the request message
Returns:
MessageFormatter - The messageFormatter for the relavent request message
Throws:
AxisFault - - Thrown in case an exception occurs

initializeTimeouts

protected void initializeTimeouts(MessageContext msgContext,
                                  org.apache.commons.httpclient.HttpClient httpClient)
This is used to get the dynamically set time out values from the message context. If the values are not available or invalid then the default values or the values set by the configuration will be used

Parameters:
msgContext - the active MessageContext
httpClient -

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 © 2007 Apache Web Services Project. All Rights Reserved.