SAP NetWeaver '04

com.sapportals.wcm.util.http
Interface IResponse

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
public interface IResponse

IWDResponse represents the response to a HTTP request, as performed with an IWDRequest.

Whether the IWDResponse keeps a Document is influenced by two factors:

  1. when the IWDRequest indicated that a response document is expected
  2. when the response carried a 207 status code with content type text/xml
However the document may still be null due to missing response body, etc.

Whether the IWDResponse keeps a InputStream is influenced mainly by the indication in the IWDRequest, namely if the client indicates that he would like to get the response as a InputStream.

Copyright (c) SAP AG 2001-2002


Method Summary
 long getContentLength()
           
 java.lang.String getContentType()
           
 org.w3c.dom.Document getDocument()
           
 java.lang.String getHeader(java.lang.String name)
           
 java.util.Iterator getHeaderNames()
           
 java.lang.String getHttpVersion()
           
 int getStatus()
           
 java.lang.String getStatusDescription()
           
 java.io.InputStream getStream()
           
 boolean hasDocument()
           
 boolean hasStream()
           
 

Method Detail

getDocument

public org.w3c.dom.Document getDocument()
Returns:
the parsed XML Document from the HTTP response or null

getStream

public java.io.InputStream getStream()
Returns:
an InputStream to read the body of a HTTP response from or null

getContentType

public java.lang.String getContentType()
Returns:
the mime type of the response body or null if not specified

getContentLength

public long getContentLength()
Returns:
the length of the HTTP response body or -1 if not specified

getHeader

public java.lang.String getHeader(java.lang.String name)
Parameters:
name - TBD: Description of the incoming method parameter
Returns:
the HTTP header field with given name or null if not specified

getHeaderNames

public java.util.Iterator getHeaderNames()
Returns:
enumeration of all header fields in HTTP response

getHttpVersion

public java.lang.String getHttpVersion()
Returns:
HTTP version string (RFC2616, section 3.1)

getStatus

public int getStatus()
Returns:
HTTP status code of response

getStatusDescription

public java.lang.String getStatusDescription()
Returns:
HTTP status description of response

hasDocument

public boolean hasDocument()
Returns:
if HTTP response contained a valid XML document

hasStream

public boolean hasStream()
Returns:
if InputStream for HTTP body is available

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.