XBinder  Version 2.6.x
rtxSOAP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
27 #ifndef _RTXSOAP_H_
28 #define _RTXSOAP_H_
29 
30 #include "rtxsrc/rtxCommon.h"
31 #include "rtxsrc/rtxSocket.h"
32 
33 #define HTTP_VERSION "1.1"
34 
35 typedef enum { OSSOAPV1, OSSOAPV2 } OSSoapVersion;
36 
37 typedef struct OSSOAPCONN {
38  OSCTXT* pctxt;
39  OSRTSOCKET socket;
40  OSSoapVersion soapVersion;
41  const char* endpoint;
42  char* host;
43  int port;
44  const char* path;
45  const char* soapAction;
46  OSBOOL keepAlive;
47  OSBOOL chunked;
48  OSOCTET spare[2]; /* maintain word boundary */
49  size_t contentLength;
50  int responseStatusCode; /* status code to send in HTTP response */
51  OSUINT32 recvTimeoutSecs;
52 } OSSOAPCONN;
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
67 EXTERNRT int rtxSoapInitConn
68 (OSSOAPCONN* pSoapConn, OSCTXT* pctxt, OSSoapVersion soapv, const char* url);
69 
78 EXTERNRT int rtxSoapAcceptConn
79 (OSRTSOCKET listenSocket, OSSOAPCONN* pSoapConn);
80 
89 EXTERNRT int rtxSoapConnect (OSSOAPCONN* pSoapConn);
90 
100 EXTERNRT int rtxSoapRecvHttp (OSSOAPCONN* pSoapConn);
101 
115 EXTERNRT int rtxSoapRecvHttpContent
116 (OSSOAPCONN* pSoapConn, OSOCTET** ppbuf);
117 
118 EXTERNRT int rtxSoapRecvHttpLine
119 (OSSOAPCONN* pSoapConn, char* lbuf, size_t lbufsiz);
120 
129 EXTERNRT int rtxSoapSendHttpResponse
130 (OSSOAPCONN* pSoapConn, const OSUTF8CHAR* soapMsg);
131 
142 EXTERNRT int rtxSoapSendHttp
143 (OSSOAPCONN* pSoapConn, const OSUTF8CHAR* soapMsg);
144 
157 EXTERNRT int rtxSoapSetReadTimeout (OSSOAPCONN* pSoapConn, OSUINT32 nsecs);
158 
159 EXTERNRT int rtxHttpParseHdr
160 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
161 
162 /* deprecated. */
163 EXTERNRT int rtxHttpPost (OSSOAPCONN* pSoapConn, size_t count);
164 
165 /* deprecated */
166 EXTERNRT int rtxHttpPostHdr
167 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
168 
169 EXTERNRT int rtxHttpTagCmp (const char *s, const char *t);
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif /* _RTXSOAP_H_ */
EXTERNRT int rtxSoapSendHttp(OSSOAPCONN *pSoapConn, const OSUTF8CHAR *soapMsg)
This function sends a complete HTTP POST request to a SOAP connection.
EXTERNRT int rtxSoapRecvHttp(OSSOAPCONN *pSoapConn)
This function receives the initial header returned from an HTTP request.
int OSRTSOCKET
Socket handle type definition.
Definition: rtxSocket.h:65
EXTERNRT int rtxSoapRecvHttpContent(OSSOAPCONN *pSoapConn, OSOCTET **ppbuf)
This function receives a complete HTTP response from a SOAP connection.
EXTERNRT int rtxSoapSetReadTimeout(OSSOAPCONN *pSoapConn, OSUINT32 nsecs)
This function sets the read timeout value to the given number of seconds.
EXTERNRT int rtxSoapAcceptConn(OSRTSOCKET listenSocket, OSSOAPCONN *pSoapConn)
This function accepts an incoming connection request and sets up a stream on which to receive message...
EXTERNRT int rtxSoapConnect(OSSOAPCONN *pSoapConn)
This function creates a connection to a SOAP endpoint.
EXTERNRT int rtxSoapSendHttpResponse(OSSOAPCONN *pSoapConn, const OSUTF8CHAR *soapMsg)
This function sends a SOAP message as an HTTP response.
Run-time context structure.
Definition: rtxContext.h:185
EXTERNRT int rtxSoapInitConn(OSSOAPCONN *pSoapConn, OSCTXT *pctxt, OSSoapVersion soapv, const char *url)
This function initializes a connection to a SOAP endpoint.
Common runtime constants, data structure definitions, and run-time functions to support various data ...