soaprmi.soaprpc
Class HttpUtils

java.lang.Object
  extended bysoaprmi.soaprpc.HttpUtils

public class HttpUtils
extends java.lang.Object

Based on Apache SOAP - a bunch of utility stuff for doing HTTP things.

Author:
Aleksander Slominski, Sanjiva Weerawarana (sanjiva@watson.ibm.com), Matthew J. Duftler (duftler@us.ibm.com), Wouter Cloetens (wcloeten@raleigh.ibm.com)

Nested Class Summary
static class HttpUtils.HttpResult
           
 
Field Summary
static java.lang.String HEADER_CONTENT_LENGTH
           
static java.lang.String HEADER_CONTENT_TYPE
           
static java.lang.String HEADER_HOST
           
static java.lang.String HEADER_POST
           
static java.lang.String HEADERVAL_DEFAULT_CHARSET
           
static int HTTP_DEFAULT_PORT
           
static int HTTPS_DEFAULT_PORT
           
 
Constructor Summary
HttpUtils()
           
 
Method Summary
static HttpUtils.HttpResult post(SoaprmiClientSocketFactory socketFactory, java.lang.String host, int port, java.lang.String path, java.lang.String requestContent, java.util.Map requestHeaders, java.lang.String requestContentType, int timeout, java.lang.String httpProxyHost, int httpProxyPort, java.lang.String location)
          POST something to the given URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_POST

public static final java.lang.String HEADER_POST
See Also:
Constant Field Values

HEADER_HOST

public static final java.lang.String HEADER_HOST
See Also:
Constant Field Values

HEADER_CONTENT_TYPE

public static final java.lang.String HEADER_CONTENT_TYPE
See Also:
Constant Field Values

HEADER_CONTENT_LENGTH

public static final java.lang.String HEADER_CONTENT_LENGTH
See Also:
Constant Field Values

HEADERVAL_DEFAULT_CHARSET

public static final java.lang.String HEADERVAL_DEFAULT_CHARSET
See Also:
Constant Field Values

HTTP_DEFAULT_PORT

public static final int HTTP_DEFAULT_PORT
See Also:
Constant Field Values

HTTPS_DEFAULT_PORT

public static final int HTTPS_DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

post

public static HttpUtils.HttpResult post(SoaprmiClientSocketFactory socketFactory,
                                        java.lang.String host,
                                        int port,
                                        java.lang.String path,
                                        java.lang.String requestContent,
                                        java.util.Map requestHeaders,
                                        java.lang.String requestContentType,
                                        int timeout,
                                        java.lang.String httpProxyHost,
                                        int httpProxyPort,
                                        java.lang.String location)
                                 throws java.io.IOException,
                                        RemoteException
POST something to the given URL. The headers are put in as HTTP headers, the content length is calculated and the content byte array is sent as the POST content.

Parameters:
timeout - the amount of time, in ms, to block on reading data
httpProxyHost - the HTTP proxy host or null if no proxy
httpProxyPort - the HTTP proxy port, if the proxy host is not null
Throws:
java.io.IOException
RemoteException


Copyright (c) 2004 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.