org.apache.axis2.transport.http
Class HTTPTransportUtils

java.lang.Object
  extended byorg.apache.axis2.transport.http.HTTPTransportUtils

public class HTTPTransportUtils
extends java.lang.Object


Constructor Summary
HTTPTransportUtils()
           
 
Method Summary
static org.apache.axiom.soap.SOAPEnvelope createEnvelopeFromGetRequest(java.lang.String requestUrl, java.util.Map map, ConfigurationContext configCtx)
           
static boolean doWriteMTOM(MessageContext msgContext)
           
static boolean doWriteSwA(MessageContext msgContext)
           
static java.lang.String getCharSetEncoding(MessageContext msgContext)
          Utility method to query CharSetEncoding.
static java.io.InputStream handleGZip(MessageContext msgContext, java.io.InputStream in)
           
static boolean isDoingREST(MessageContext msgContext)
           
static boolean isRESTRequest(java.lang.String contentType)
          This will match for content types that will be regarded as REST in WSDL2.0.
static boolean processHTTPGetRequest(MessageContext msgContext, java.io.OutputStream out, java.lang.String soapAction, java.lang.String requestURI, ConfigurationContext configurationContext, java.util.Map requestParameters)
          Deprecated. use RESTUtil.processURLRequest(MessageContext msgContext, OutputStream out, String contentType) instead
static Handler.InvocationResponse processHTTPPostRequest(MessageContext msgContext, java.io.InputStream in, java.io.OutputStream out, java.lang.String contentType, java.lang.String soapActionHeader, java.lang.String requestURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPTransportUtils

public HTTPTransportUtils()
Method Detail

createEnvelopeFromGetRequest

public static org.apache.axiom.soap.SOAPEnvelope createEnvelopeFromGetRequest(java.lang.String requestUrl,
                                                                              java.util.Map map,
                                                                              ConfigurationContext configCtx)
                                                                       throws AxisFault
Throws:
AxisFault

doWriteMTOM

public static boolean doWriteMTOM(MessageContext msgContext)

doWriteSwA

public static boolean doWriteSwA(MessageContext msgContext)

getCharSetEncoding

public static java.lang.String getCharSetEncoding(MessageContext msgContext)
Utility method to query CharSetEncoding. First look in the MessageContext. If it's not there look in the OpContext. Use the defualt, if it's not given in either contexts.

Parameters:
msgContext -
Returns:
CharSetEncoding

processHTTPGetRequest

public static boolean processHTTPGetRequest(MessageContext msgContext,
                                            java.io.OutputStream out,
                                            java.lang.String soapAction,
                                            java.lang.String requestURI,
                                            ConfigurationContext configurationContext,
                                            java.util.Map requestParameters)
                                     throws AxisFault
Deprecated. use RESTUtil.processURLRequest(MessageContext msgContext, OutputStream out, String contentType) instead

Parameters:
msgContext - - The MessageContext of the Request Message
out - - The output stream of the response
soapAction - - SoapAction of the request
requestURI - - The URL that the request came to
configurationContext - - The Axis Configuration Context
requestParameters - - The parameters of the request message
Returns:
- boolean indication whether the operation was succesfull
Throws:
AxisFault - - Thrown in case a fault occurs

processHTTPPostRequest

public static Handler.InvocationResponse processHTTPPostRequest(MessageContext msgContext,
                                                                java.io.InputStream in,
                                                                java.io.OutputStream out,
                                                                java.lang.String contentType,
                                                                java.lang.String soapActionHeader,
                                                                java.lang.String requestURI)
                                                         throws AxisFault
Throws:
AxisFault

handleGZip

public static java.io.InputStream handleGZip(MessageContext msgContext,
                                             java.io.InputStream in)
                                      throws java.io.IOException
Throws:
java.io.IOException

isDoingREST

public static boolean isDoingREST(MessageContext msgContext)

isRESTRequest

public static boolean isRESTRequest(java.lang.String contentType)
This will match for content types that will be regarded as REST in WSDL2.0. This contains, 1. application/xml 2. application/x-www-form-urlencoded 3. multipart/form-data

If the request doesnot contain a content type; this will return true.

Parameters:
contentType -
Returns:
Boolean


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