org.apache.soap.util.net
Class HTTPUtils

java.lang.Object
  |
  +--org.apache.soap.util.net.HTTPUtils

public class HTTPUtils
extends java.lang.Object

A bunch of utility stuff for doing HTTP things.

2000/07/30 W. Cloetens added Multipart Mime support

Author:
Sanjiva Weerawarana (sanjiva@watson.ibm.com), Matthew J. Duftler (duftler@us.ibm.com), Wouter Cloetens (wcloeten@raleigh.ibm.com), Scott Nichol (snichol@computer.org)

Field Summary
static int DEFAULT_OUTPUT_BUFFER_SIZE
           
 
Constructor Summary
HTTPUtils()
           
 
Method Summary
static TransportMessage post(java.net.URL url, TransportMessage request, int timeout, java.lang.String httpProxyHost, int httpProxyPort)
          POST something to the given URL.
static TransportMessage post(java.net.URL url, TransportMessage request, int timeout, java.lang.String httpProxyHost, int httpProxyPort, int outputBufferSize)
          POST something to the given URL.
static TransportMessage post(java.net.URL url, TransportMessage request, int timeout, java.lang.String httpProxyHost, int httpProxyPort, int outputBufferSize, java.lang.Boolean tcpNoDelay)
          POST something to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OUTPUT_BUFFER_SIZE

public static final int DEFAULT_OUTPUT_BUFFER_SIZE
Constructor Detail

HTTPUtils

public HTTPUtils()
Method Detail

post

public static TransportMessage post(java.net.URL url,
                                    TransportMessage request,
                                    int timeout,
                                    java.lang.String httpProxyHost,
                                    int httpProxyPort)
                             throws java.lang.IllegalArgumentException,
                                    java.io.IOException,
                                    SOAPException
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:
url - the url to post to
request - the message
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
Returns:
the response message

post

public static TransportMessage post(java.net.URL url,
                                    TransportMessage request,
                                    int timeout,
                                    java.lang.String httpProxyHost,
                                    int httpProxyPort,
                                    int outputBufferSize)
                             throws java.lang.IllegalArgumentException,
                                    java.io.IOException,
                                    SOAPException
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:
url - the url to post to
request - the message
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
outputBufferSize - the size of the output buffer on the HTTP stream
Returns:
the response message

post

public static TransportMessage post(java.net.URL url,
                                    TransportMessage request,
                                    int timeout,
                                    java.lang.String httpProxyHost,
                                    int httpProxyPort,
                                    int outputBufferSize,
                                    java.lang.Boolean tcpNoDelay)
                             throws java.lang.IllegalArgumentException,
                                    java.io.IOException,
                                    SOAPException
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:
url - the url to post to
request - the message
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
outputBufferSize - the size of the output buffer on the HTTP stream
tcpNoDelay - the tcpNoDelay setting for the socket
Returns:
the response message


Copyright © 2001 Apache XML Project. All Rights Reserved.