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.
EXTERNRT int rtxSoapAcceptConn (OSRTSOCKET listenSocket, OSSOAPCONN *pSoapConn)
 This function accepts an incoming connection request and sets up a stream on which to receive messages.
EXTERNRT int rtxSoapConnect (OSSOAPCONN *pSoapConn)
 This function creates a connection to a SOAP endpoint.
EXTERNRT int rtxSoapRecvHttp (OSSOAPCONN *pSoapConn)
 This function receives the initial header returned from an HTTP request.
EXTERNRT int rtxSoapRecvHttpContent (OSSOAPCONN *pSoapConn, OSOCTET **ppbuf)
 This function receives a complete HTTP response from a SOAP connection.
EXTERNRT int rtxSoapSendHttp (OSSOAPCONN *pSoapConn, const OSUTF8CHAR *soapMsg)
 This function sends a complete HTTP request to a SOAP connection.

Detailed Description

: common SOAP socket communications functions

Definition in file rtxSOAP.h.


Function Documentation

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.
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.
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.
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.
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.
EXTERNRT int rtxSoapSendHttp ( OSSOAPCONN *  pSoapConn,
const OSUTF8CHAR *  soapMsg 
)

This function sends a complete HTTP request to a SOAP connection.

The request is stored in the XBinder context buffer. If an XML encode operation was just completed, the 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.