Package org.apache.axis2.transport.http
Class HTTPTransportUtils
- java.lang.Object
-
- org.apache.axis2.transport.http.HTTPTransportUtils
-
public class HTTPTransportUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description HTTPTransportUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SOAPEnvelope
createEnvelopeFromGetRequest(String requestUrl, Map map, ConfigurationContext configCtx)
Deprecated.This was used only by the now deprecated processHTTPGetRequest() method.static EndpointReference[]
getEPRsForService(ConfigurationContext configurationContext, TransportInDescription trpInDesc, String serviceName, String ip, int port)
static InputStream
handleGZip(MessageContext msgContext, InputStream in)
static int
initializeMessageContext(MessageContext msgContext, String soapActionHeader, String requestURI, String contentType)
static boolean
isRESTRequest(String contentType)
This will match for content types that will be regarded as REST in WSDL2.0.static boolean
processHTTPGetRequest(MessageContext msgContext, OutputStream out, String soapAction, String requestURI, ConfigurationContext configurationContext, Map requestParameters)
Deprecated.use RESTUtil.processURLRequest(MessageContext msgContext, OutputStream out, String contentType) insteadstatic Handler.InvocationResponse
processHTTPPostRequest(MessageContext msgContext, InputStream in, OutputStream out, String contentType, String soapActionHeader, String requestURI)
static Handler.InvocationResponse
processHTTPPostRequest(MessageContext msgContext, InputStream in, OutputStream out, String contentType, Builder builder, String soapActionHeader, String requestURI)
-
-
-
Method Detail
-
createEnvelopeFromGetRequest
public static SOAPEnvelope createEnvelopeFromGetRequest(String requestUrl, Map map, ConfigurationContext configCtx) throws AxisFault
Deprecated.This was used only by the now deprecated processHTTPGetRequest() method.- Parameters:
requestUrl
- the request urlmap
- the map of url parametersconfigCtx
- axis ConfigurationContext- Returns:
- the SOAPEnvelope object
- Throws:
AxisFault
- if an error occurs
-
processHTTPGetRequest
public static boolean processHTTPGetRequest(MessageContext msgContext, OutputStream out, String soapAction, String requestURI, ConfigurationContext configurationContext, Map requestParameters) throws AxisFault
Deprecated.use RESTUtil.processURLRequest(MessageContext msgContext, OutputStream out, String contentType) instead- Parameters:
msgContext
- - The MessageContext of the Request Messageout
- - The output stream of the responsesoapAction
- - SoapAction of the requestrequestURI
- - The URL that the request came toconfigurationContext
- - The Axis Configuration ContextrequestParameters
- - 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, InputStream in, OutputStream out, String contentType, String soapActionHeader, String requestURI) throws AxisFault
- Throws:
AxisFault
-
processHTTPPostRequest
public static Handler.InvocationResponse processHTTPPostRequest(MessageContext msgContext, InputStream in, OutputStream out, String contentType, Builder builder, String soapActionHeader, String requestURI) throws AxisFault
- Throws:
AxisFault
-
initializeMessageContext
public static int initializeMessageContext(MessageContext msgContext, String soapActionHeader, String requestURI, String contentType)
-
handleGZip
public static InputStream handleGZip(MessageContext msgContext, InputStream in) throws IOException
- Throws:
IOException
-
isRESTRequest
public static boolean isRESTRequest(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
- content type to check- Returns:
- Boolean
-
getEPRsForService
public static EndpointReference[] getEPRsForService(ConfigurationContext configurationContext, TransportInDescription trpInDesc, String serviceName, String ip, int port) throws AxisFault
- Throws:
AxisFault
-
-