XBinder
Version 2.9.x
|
: common SOAP socket communications functions More...
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxSoapInitConn (OSSOAPCONN *pSoapConn, OSCTXT *pctxt, OSSoapVersion soapv, const char *url) |
This function initializes a connection to a SOAP endpoint. More... | |
EXTERNRT int | rtxSoapAcceptConn (OSRTSOCKET listenSocket, OSSOAPCONN *pSoapConn) |
This function accepts an incoming connection request and sets up a stream on which to receive messages. More... | |
EXTERNRT int | rtxSoapConnect (OSSOAPCONN *pSoapConn) |
This function creates a connection to a SOAP endpoint. More... | |
EXTERNRT int | rtxSoapRecvHttp (OSSOAPCONN *pSoapConn) |
This function receives the initial header returned from an HTTP request. More... | |
EXTERNRT int | rtxSoapRecvHttpContent (OSSOAPCONN *pSoapConn, OSOCTET **ppbuf) |
This function receives a complete HTTP response from a SOAP connection. More... | |
EXTERNRT int | rtxSoapSendHttpResponse (OSSOAPCONN *pSoapConn, const OSUTF8CHAR *soapMsg) |
This function sends a SOAP message as an HTTP response. More... | |
EXTERNRT int | rtxSoapSendHttp (OSSOAPCONN *pSoapConn, const OSUTF8CHAR *soapMsg) |
This function sends a complete HTTP POST request to a SOAP connection. More... | |
EXTERNRT int | rtxSoapSetReadTimeout (OSSOAPCONN *pSoapConn, OSUINT32 nsecs) |
This function sets the read timeout value to the given number of seconds. More... | |
: common SOAP socket communications functions
Definition in file rtxSOAP.h.
EXTERNRT int rtxSoapAcceptConn | ( | OSRTSOCKET | listenSocket, |
OSSOAPCONN * | pSoapConn | ||
) |
This function accepts an incoming connection request and sets up a stream on which to receive messages.
listenSocket | - Listener socket |
pSoapConn | - Pointer to SOAP connection structure. |
EXTERNRT int rtxSoapConnect | ( | OSSOAPCONN * | pSoapConn | ) |
This function creates a connection to a SOAP endpoint.
The endpoint is described by a SOAP connection structure which must have been initialized using the rtxSoapInitConn function.
pSoapConn | - Pointer to SOAP connection structure. |
EXTERNRT int rtxSoapInitConn | ( | OSSOAPCONN * | pSoapConn, |
OSCTXT * | pctxt, | ||
OSSoapVersion | soapv, | ||
const char * | url | ||
) |
This function initializes a connection to a SOAP endpoint.
pSoapConn | - Pointer to SOAP connection structure. |
pctxt | - Pointer to an XBinder run-time context structure. |
soapv | - SOAP version that is to be used. |
url | - URL to which to connect. |
EXTERNRT int rtxSoapRecvHttp | ( | OSSOAPCONN * | pSoapConn | ) |
This function receives the initial header returned from an HTTP request.
The header response information including content length and whether the response is 'chunked' is stored in the connection structure.
pSoapConn | - Pointer to SOAP connection structure. |
EXTERNRT int rtxSoapRecvHttpContent | ( | OSSOAPCONN * | pSoapConn, |
OSOCTET ** | ppbuf | ||
) |
This function receives a complete HTTP response from a SOAP connection.
The response if stored in a dynamic memory buffer which is returned via the buffer pointer argument. Memory is allocated for the response using XBinder memory management, so it will be freed when the context is freed or the rtxMemFree function is called. This buffer can now be used in a decode function call to parse the received XML message into a program structure.
pSoapConn | - Pointer to SOAP connection structure. |
ppbuf | - Pointer to pointer to receive content buffer. |
EXTERNRT int rtxSoapSendHttp | ( | OSSOAPCONN * | pSoapConn, |
const OSUTF8CHAR * | soapMsg | ||
) |
This function sends a complete HTTP POST request to a SOAP connection.
The request is stored in the XBinder context buffer. If an XML encode operation was just completed, then calling this function will send the encoded XML message to the SOAP endpoint.
pSoapConn | - Pointer to SOAP connection structure. |
soapMsg | - SOAP XML message to be sent. |
EXTERNRT int rtxSoapSendHttpResponse | ( | OSSOAPCONN * | pSoapConn, |
const OSUTF8CHAR * | soapMsg | ||
) |
This function sends a SOAP message as an HTTP response.
The SOAP message may be held in pSoapConn's context buffer.
pSoapConn | - Pointer to SOAP connection structure. |
soapMsg | - SOAP XML message to be sent. |
EXTERNRT int rtxSoapSetReadTimeout | ( | OSSOAPCONN * | pSoapConn, |
OSUINT32 | nsecs | ||
) |
This function sets the read timeout value to the given number of seconds.
Any read operation attempted on the SOAP connection will timeout after this period of time if no data is received.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
nsecs | Number of seconds to wait before timing out. |