Summary:
See also: The Genero Web Services COM Library
The TCP Request class provides an interface to perform asynchronous XML and TEXT requests over TCP, with additional XML streaming possibilities. Notice that status is set to zero after a successful method call.
com.TCPRequest
Class Methods | |
Name | Description |
com.TCPRequest.Create( STRING ) RETURNING com.TCPRequest |
Creates a TCPRequest object by providing a mandatory url with TCP or TCPS as the protocol.
Note: url can be an identifier of an URL mapping with an optional alias:// prefix. See FGLPROFILE Configuration for more details about URL mapping with aliases, and for proxy and security configuration. Throws an exception in case of errors, and updates status with an error code. |
Object Methods | |
Name | Description |
setTimeOut( INTEGER ) |
Sets the time value in seconds to wait for a reading or writing operation,
before a break.
Note: -1 means infinite. |
setConnectionTimeOut( INTEGER ) |
Sets the time value in seconds to wait for the establishment
of the connection, before a break.
Note: -1 means infinite. |
setMaximumResponseLength( INTEGER ) |
Sets the maximum authorized size in Kbyte of the whole response, before a break.
Note: -1 means no limit. |
doRequest() |
Performs the request.
Note: The connection is shutdown for writing to notify that no data will be sent. Throws an exception in case of errors, and updates status with an error code. |
doXmlRequest(
|
Performs the request by sending the entire
xml.DomDocument at once.
Note: The connection is shutdown for writing to notify that no more data will be sent. Throws an exception in case of errors, and updates status with an error code. |
doTextRequest( STRING) |
Performs the request by sending a string at once.
Note: The connection is shutdown for writing to notify that no more data will be sent. Throws an exception in case of errors, and updates status with an error code. |
beginXmlRequest()
RETURNING xml.StaxWriter |
Begins the streaming HTTP request and returns an
xml.StaxWriter object ready to send XML to the server.
Throws an exception in case of errors, and updates status with an error code. |
endXmlRequest( |
Ends the streaming HTTP request by closing the Stax writer.
Note: The connection is shutdown for writing to notify that no more data will be sent. Throws an exception in case of errors, and updates status with an error code. |
getResponse()
RETURNING com.TCPResponse |
Returns the response of one of the doRequest, doXmlRequest, doTextRequest or beginXmlRequest and endXmlRequest calls in a
com.TCPResponse object.
Throws an exception in case of errors, and updates status with an error code. |
getAsyncResponse()
RETURNING
com.TCPResponse |
Returns the response of one of the doRequest, doXmlRequest, doTextRequest or beginXmlRequest and endXmlRequest calls in a
com.TCPResponse object, or NULL if
the response was not yet received.
Remarks: If a previous call returned NULL, a new call will return the expected response if it already arrived, or NULL again if the response was still not received. Throws an exception in case of errors, and updates status with an error code. |