XBinder  Version 2.6.x
Functions
rtxSOAP.h File Reference

: common SOAP socket communications functions More...

#include "rtxsrc/rtxCommon.h"
#include "rtxsrc/rtxSocket.h"

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...
 

Detailed Description

: common SOAP socket communications functions

Definition in file rtxSOAP.h.

Function Documentation

◆ rtxSoapAcceptConn()

EXTERNRT int rtxSoapAcceptConn ( OSRTSOCKET  listenSocket,
OSSOAPCONN *  pSoapConn 
)

This function accepts an incoming connection request and sets up a stream on which to receive messages.

Parameters
listenSocket- Listener socket
pSoapConn- Pointer to SOAP connection structure.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapConnect()

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.

Parameters
pSoapConn- Pointer to SOAP connection structure.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapInitConn()

EXTERNRT int rtxSoapInitConn ( OSSOAPCONN *  pSoapConn,
OSCTXT pctxt,
OSSoapVersion  soapv,
const char *  url 
)

This function initializes a connection to a SOAP endpoint.

Parameters
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.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapRecvHttp()

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.

Parameters
pSoapConn- Pointer to SOAP connection structure.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapRecvHttpContent()

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.

Parameters
pSoapConn- Pointer to SOAP connection structure.
ppbuf- Pointer to pointer to receive content buffer.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapSendHttp()

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.

Parameters
pSoapConn- Pointer to SOAP connection structure.
soapMsg- SOAP XML message to be sent.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapSendHttpResponse()

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.

Parameters
pSoapConn- Pointer to SOAP connection structure.
soapMsg- SOAP XML message to be sent.
Returns
- Operation status: 0 if success, negative code if error.

◆ rtxSoapSetReadTimeout()

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.

Parameters
pctxtPointer to a context structure variable that has been initialized for stream operations.
nsecsNumber of seconds to wait before timing out.
Returns
Completion status of operation: 0 = success, negative return value is error.