The HTTPServiceRequest class / com.HTTPServiceRequest methods |
Starts an HTTP streaming response.
beginXmlResponse( code INTEGER, desc STRING ) RETURNING writer xml.StaxWriter
The beginXmlResponse() method starts a HTTP streaming response by sending the a status (code) and description (desc), followed by the headers previously set, and returns a xml.StaxWriter object ready to send XML as the HTTP body.
If the request failed to be read, its content will be discarded; for example, when a request is not well formatted.
The default Content-Type header is text/xml, but it can be changed if of the form */xml or */*+xml. For example: application/xhtml+xml.
In HTTP 1.1, if the body size is greater than 32k, the response will be sent in several chunks of the same size.
If the description is NULL, a default description according to the status code is sent.
In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.