public class RESTUtil
extends java.lang.Object
Constructor and Description |
---|
RESTUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
dispatchAndVerify(org.apache.axis2.context.MessageContext msgContext) |
static org.apache.axis2.description.AxisOperation |
findOperation(org.apache.axis2.description.AxisService svc,
org.apache.axis2.context.MessageContext mc)
Get the axis operation from the operation name used by the Synapse service (for message mediation).
|
static java.lang.String |
getURI(org.apache.axis2.context.MessageContext messageContext,
java.lang.String address)
This method will return the URI part for the GET HTTPRequest by converting
the SOAP infoset to the URL-encoded GET format
|
static void |
processGetAndDeleteRequest(org.apache.axis2.context.MessageContext msgContext,
java.io.OutputStream out,
java.lang.String requestURI,
org.apache.http.Header contentTypeHeader,
java.lang.String httpMethod,
boolean dispatching)
Processes the HTTP GET / DELETE request and builds the SOAP info-set of the REST message
|
static void |
processPOSTRequest(org.apache.axis2.context.MessageContext msgContext,
java.io.InputStream is,
java.io.OutputStream os,
java.lang.String requestURI,
org.apache.http.Header contentTypeHeader,
boolean dispatching)
Processes the HTTP POST request and builds the SOAP info-set of the REST message
|
static void |
processPOSTRequest(org.apache.axis2.context.MessageContext msgContext,
java.io.InputStream is,
java.io.OutputStream os,
java.lang.String requestURI,
java.lang.String contentType,
boolean dispatching)
Processes the HTTP POST request and builds the SOAP info-set of the REST message
|
static void |
processURLRequest(org.apache.axis2.context.MessageContext msgContext,
java.io.OutputStream out,
java.lang.String soapAction,
java.lang.String requestURI)
Processes the HTTP GET request and builds the SOAP info-set of the REST message
|
public static java.lang.String getURI(org.apache.axis2.context.MessageContext messageContext, java.lang.String address) throws org.apache.axis2.AxisFault
messageContext
- - from which the SOAP infoset will be extracted to encodeaddress
- - address of the actual serviceorg.apache.axis2.AxisFault
- - if the SOAP infoset cannot be converted in to the GET URL-encoded formatpublic static void processGetAndDeleteRequest(org.apache.axis2.context.MessageContext msgContext, java.io.OutputStream out, java.lang.String requestURI, org.apache.http.Header contentTypeHeader, java.lang.String httpMethod, boolean dispatching) throws org.apache.axis2.AxisFault
msgContext
- The MessageContext of the Request Messageout
- The output stream of the responserequestURI
- The URL that the request came tocontentTypeHeader
- The contentType header of the requesthttpMethod
- The http method of the requestdispatching
- Weather we should do service dispatchingorg.apache.axis2.AxisFault
- - Thrown in case a fault occurspublic static void processURLRequest(org.apache.axis2.context.MessageContext msgContext, java.io.OutputStream out, java.lang.String soapAction, java.lang.String requestURI) throws org.apache.axis2.AxisFault
msgContext
- The MessageContext of the Request Messageout
- The output stream of the responsesoapAction
- SoapAction of the requestrequestURI
- The URL that the request came toorg.apache.axis2.AxisFault
- - Thrown in case a fault occurspublic static void processPOSTRequest(org.apache.axis2.context.MessageContext msgContext, java.io.InputStream is, java.io.OutputStream os, java.lang.String requestURI, org.apache.http.Header contentTypeHeader, boolean dispatching) throws org.apache.axis2.AxisFault
msgContext
- The MessageContext of the Request Messageis
- The input stream of the requestos
- The output stream of the responserequestURI
- The URL that the request came tocontentTypeHeader
- The contentType header of the requestdispatching
- Weather we should do dispatchingorg.apache.axis2.AxisFault
- - Thrown in case a fault occurspublic static void processPOSTRequest(org.apache.axis2.context.MessageContext msgContext, java.io.InputStream is, java.io.OutputStream os, java.lang.String requestURI, java.lang.String contentType, boolean dispatching) throws org.apache.axis2.AxisFault
msgContext
- MessageContext of the Request Messageis
- Input stream of the requestos
- Output stream of the responserequestURI
- URL that the request came tocontentType
- ContentType header of the requestdispatching
- Whether we should do dispatchingorg.apache.axis2.AxisFault
- - Thrown in case a fault occurspublic static void dispatchAndVerify(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static org.apache.axis2.description.AxisOperation findOperation(org.apache.axis2.description.AxisService svc, org.apache.axis2.context.MessageContext mc)
svc
- axis servicemc
- messageContext message contextCopyright © 2005-2020 Apache Software Foundation. All Rights Reserved.