Dep/gSOAP: Upgrade to 2.8.117

This commit is contained in:
Shauren
2021-12-21 01:15:58 +01:00
parent e453c632e6
commit 172e5c3577
14 changed files with 9527 additions and 6198 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings) gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings)
http://gsoap2.sourceforge.net/ http://gsoap2.sourceforge.net/
Version: 2.8.49 Version: 2.8.117
recastnavigation (Recast is state of the art navigation mesh construction toolset for games) recastnavigation (Recast is state of the art navigation mesh construction toolset for games)
https://github.com/recastnavigation/recastnavigation https://github.com/recastnavigation/recastnavigation
+1 -1
View File
@@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
file(GLOB sources *.cpp *.h) file(GLOB sources *.cpp *.c *.h)
add_library(gsoap STATIC ${sources}) add_library(gsoap STATIC ${sources})
+277
View File
@@ -0,0 +1,277 @@
/*
httpget.c
gSOAP HTTP GET plugin.
See instructions below.
gSOAP XML Web services tools
Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
This part of the software is released under ONE of the following licenses:
GPL or the gSOAP public license.
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2008 Robert A. van Engelen, Genivia inc. All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
[email protected] / [email protected]
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
Compile & link with stand-alone gSOAP server for HTTP GET support.
Compile & link with gSOAP clients for client-side HTTP GET requests.
Usage (server side):
struct soap soap;
soap_init(&soap);
soap_register_plugin_arg(&soap, http_get, http_get_handler);
...
... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
...
soap_done(&soap); // detach plugin (calls plugin->fdelete)
You need to define a HTTP GET handling function at the server-side:
int http_get_handler(struct soap*)
which will be called from the plugin upon an HTTP GET request.
The function should return an error code or SOAP_OK;
This function should produce a valid HTTP response, for example:
soap_response(soap, SOAP_HTML); // use this to return HTML ...
soap_response(soap, SOAP_OK); // ... or use this to return a SOAP message
...
soap_send(soap, "<HTML>...</HTML>"); // example HTML
...
soap_end_send(soap);
To get query string key-value pairs within a service routine, use:
char *s;
s = soap_query(soap);
while (s)
{
char *key = soap_query_key(soap, &s);
char *val = soap_query_val(soap, &s);
...
}
This will garble soap->path, which contains the HTTP path of the form:
/path?query
where path and/or ?query may be absent. The path info is obtained from
the HTTP request URL: http://domain/path?query
The URL should not exceed the length of SOAP_TAGLEN. Adjust SOAP_TAGLEN
in stdsoap2.h if necessary.
Usage (client side):
For SOAP GET method calls, declare the service method with protocol GET:
//gsoap ns service method-protocol: someMethod GET
int ns__someMethod(... in-params ..., struct ns__someMethodResponse { ... out-params ... } *);
and to make the call in your code:
struct ns__someMethodResponse res;
soap_call_ns__someMethod(soap, "endpoint", "action", ... in-params ...., &res)
Client code for non-SOAP REST GET:
To use general HTTP GET, for example to retrieve an HTML document, use:
struct soap soap;
char *buf = NULL;
size_t len = 0;
soap_init(&soap);
if (soap_GET(&soap, endpoint, action)
|| soap_begin_recv(&soap))
... connect/recv error ...
else
buf = soap_http_get_body(&soap, &len);
soap_end_recv(&soap);
... process data in buf[0..len-1]
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
The soap_http_get_body() function above returns the HTTP body content
as a string.
*/
#include "httpget.h"
#ifdef __cplusplus
extern "C" {
#endif
const char http_get_id[] = HTTP_GET_ID;
static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*));
static void http_get_delete(struct soap *soap, struct soap_plugin *p);
static int http_get_parse(struct soap *soap);
static int http_get_handler(struct soap *soap);
int http_get(struct soap *soap, struct soap_plugin *p, void *arg)
{
p->id = http_get_id;
p->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_get_data));
/* p->fcopy = http_get_copy; obsolete, see note with http_get_copy() */
p->fdelete = http_get_delete;
if (!p->data)
return SOAP_EOM;
if (http_get_init(soap, (struct http_get_data*)p->data, (int (*)(struct soap*))arg))
{
SOAP_FREE(soap, p->data); /* error: could not init */
return SOAP_EOM; /* return error */
}
return SOAP_OK;
}
static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*))
{
data->fparse = soap->fparse; /* save old HTTP header parser callback */
data->fget = handler;
data->stat_get = 0;
data->stat_post = 0;
data->stat_fail = 0;
memset((void*)data->hist_min, 0, sizeof(data->hist_min));
memset((void*)data->hist_hour, 0, sizeof(data->hist_hour));
memset((void*)data->hist_day, 0, sizeof(data->hist_day));
soap->fparse = http_get_parse; /* replace HTTP header parser callback with ours */
soap->fget = http_get_handler; /* replace HTTP GET callback with ours */
return SOAP_OK;
}
/* We will share the plugin data among all soap copies created with soap_copy(), so we don't have to define this
static int http_get_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
{
*dst = *src;
return SOAP_OK;
}
*/
static void http_get_delete(struct soap *soap, struct soap_plugin *p)
{
(void)soap;
SOAP_FREE(soap, p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
}
static int http_get_parse(struct soap *soap)
{
#ifndef WITH_LEAN
time_t t;
#ifdef HAVE_LOCALTIME_R
struct tm T;
#endif
struct tm *pT;
#endif
struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
if (!data)
return SOAP_PLUGIN_ERROR;
#ifndef WITH_LEAN
time(&t);
#ifdef HAVE_LOCALTIME_R
pT = localtime_r(&t, &T);
#else
pT = localtime(&t);
#endif
/* updates should be in mutex, but we don't mind some inaccuracy in the count to preserve performance */
data->hist_day[pT->tm_yday]++;
data->hist_day[(pT->tm_yday + 1) % 365] = 0;
data->hist_hour[pT->tm_hour]++;
data->hist_hour[(pT->tm_hour + 1) % 24] = 0;
data->hist_min[pT->tm_min]++;
data->hist_min[(pT->tm_min + 1) % 60] = 0;
#endif
soap->error = data->fparse(soap); /* parse HTTP header */
if (!soap->error)
{
if (soap->status == SOAP_POST)
data->stat_post++; /* update should be in mutex, but we don't mind some inaccuracy in the count */
}
else
{
data->stat_fail++; /* update should be in mutex, but we don't mind some inaccuracy in the count */
}
return soap->error;
}
/******************************************************************************/
static int http_get_handler(struct soap *soap)
{
struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
if (!data)
return SOAP_PLUGIN_ERROR;
soap->error = data->fget(soap); /* call user-defined HTTP GET handler */
if (soap->error)
{
/* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_fail++;
return soap->error;
}
/* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_get++;
return SOAP_OK;
}
/******************************************************************************/
void soap_http_get_stats(struct soap *soap, size_t *stat_get, size_t *stat_post, size_t *stat_fail, size_t **hist_min, size_t **hist_hour, size_t **hist_day)
{
struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
if (!data)
return;
if (stat_get)
*stat_get = data->stat_get;
if (stat_post)
*stat_post = data->stat_post;
if (stat_fail)
*stat_fail = data->stat_fail;
if (hist_min)
*hist_min = data->hist_min;
if (hist_hour)
*hist_hour = data->hist_hour;
if (hist_day)
*hist_day = data->hist_day;
}
/* deprecated: use soap_GET instead */
int soap_http_get_connect(struct soap *soap, const char *endpoint, const char *action)
{
return soap_GET(soap, endpoint, action);
}
#ifdef __cplusplus
}
#endif
-336
View File
@@ -1,336 +0,0 @@
/*
httpget.c
gSOAP HTTP GET plugin.
See instructions below.
gSOAP XML Web services tools
Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
This part of the software is released under ONE of the following licenses:
GPL, the gSOAP public license, OR Genivia's license for commercial use.
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2008 Robert A. van Engelen, Genivia inc. All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
[email protected] / [email protected]
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
Compile & link with stand-alone gSOAP server for HTTP GET support.
Compile & link with gSOAP clients for client-side HTTP GET requests.
Usage (server side):
struct soap soap;
soap_init(&soap);
soap_register_plugin_arg(&soap, http_get, http_get_handler);
...
... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
...
soap_done(&soap); // detach plugin (calls plugin->fdelete)
You need to define a HTTP GET handling function at the server-side:
int http_get_handler(struct soap*)
which will be called from the plugin upon an HTTP GET request.
The function should return an error code or SOAP_OK;
This function should produce a valid HTTP response, for example:
soap_response(soap, SOAP_HTML); // use this to return HTML ...
soap_response(soap, SOAP_OK); // ... or use this to return a SOAP message
...
soap_send(soap, "<HTML>...</HTML>"); // example HTML
...
soap_end_send(soap);
To get query string key-value pairs within a service routine, use:
char *s;
s = query(soap);
while (s)
{ char *key = query(soap, &s);
char *val = query(soap, &s);
...
}
This will garble soap->path, which contains the HTTP path of the form:
/path?query
where path and/or ?query may be absent. The path info is obtained from
the HTTP request URL: http://domain/path?query
The URL should not exceed the length of SOAP_TAGLEN. Adjust SOAP_TAGLEN
in stdsoap2.h if necessary.
Usage (client side):
For SOAP calls, declare a one-way response message in the header file,
for example:
int ns__methodResponse(... params ..., void);
The params will hold the return values returned by the server's SOAP
response message.
Client code:
struct soap soap;
soap_init(&soap);
soap_register_plugin(&soap, http_get); // register plugin
...
if (soap_get_connect(&soap, endpoint, action))
... connect error ...
else if (soap_recv_ns__methodResponse(&soap, ... params ...))
... error ...
else
... ok ...
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
Note that the endpoint URL may contain a query string with key-value
pairs to pass to the server, e.g.: http://domain/path?key=val&key=val
To use general HTTP GET, for example to retrieve an HTML document, use:
struct soap soap;
char *buf = NULL;
size_t len;
soap_init(&soap);
soap_register_plugin(&soap, http_get); // register plugin
if (soap_get_connect(&soap, endpoint, action)
|| soap_begin_recv(&soap))
... connect/recv error ...
else
buf = soap_get_http_body(&soap, &len);
soap_end_recv(&soap);
... process data in buf[0..len-1]
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
The soap_get_http_body() function above moves HTTP body content into a
buffer.
*/
#include "httpget.h"
#ifdef __cplusplus
extern "C" {
#endif
const char http_get_id[13] = HTTP_GET_ID;
static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*));
static void http_get_delete(struct soap *soap, struct soap_plugin *p);
static int http_get_parse(struct soap *soap);
int http_get(struct soap *soap, struct soap_plugin *p, void *arg)
{ p->id = http_get_id;
p->data = (void*)malloc(sizeof(struct http_get_data));
/* p->fcopy = http_get_copy; obsolete, see note with http_get_copy() */
p->fdelete = http_get_delete;
if (p->data)
if (http_get_init(soap, (struct http_get_data*)p->data, (int (*)(struct soap*))arg))
{ free(p->data); /* error: could not init */
return SOAP_EOM; /* return error */
}
return SOAP_OK;
}
static int http_get_init(struct soap *soap, struct http_get_data *data, int (*handler)(struct soap*))
{ data->fparse = soap->fparse; /* save old HTTP header parser callback */
data->fget = handler;
data->stat_get = 0;
data->stat_post = 0;
data->stat_fail = 0;
memset(data->min, 0, sizeof(data->min));
memset(data->hour, 0, sizeof(data->hour));
memset(data->day, 0, sizeof(data->day));
soap->fparse = http_get_parse; /* replace HTTP header parser callback with ours */
return SOAP_OK;
}
/* We will share the plugin data among all soap copies created with soap_copy(), so we don't have to define this
static int http_get_copy(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src)
{ *dst = *src;
return SOAP_OK;
}
*/
static void http_get_delete(struct soap *soap, struct soap_plugin *p)
{ free(p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
}
static int http_get_parse(struct soap *soap)
{
#ifndef WITH_LEAN
time_t t;
struct tm T, *pT;
#endif
struct http_get_data *data = (struct http_get_data*)soap_lookup_plugin(soap, http_get_id);
if (!data)
return SOAP_PLUGIN_ERROR;
#ifndef WITH_LEAN
time(&t);
#ifdef HAVE_LOCALTIME_R
pT = localtime_r(&t, &T);
#else
pT = localtime(&t);
#endif
/* updates should be in mutex, but we don't mind some inaccuracy in the count to preserve performance */
data->day[pT->tm_yday]++;
data->day[(pT->tm_yday + 1) % 365] = 0;
data->hour[pT->tm_hour]++;
data->hour[(pT->tm_hour + 1) % 24] = 0;
data->min[pT->tm_min]++;
data->min[(pT->tm_min + 1) % 60] = 0;
#endif
soap->error = data->fparse(soap); /* parse HTTP header */
if (soap->error == SOAP_OK)
{ /* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_post++;
}
else if (soap->error == SOAP_GET_METHOD && data->fget)
{ soap->error = SOAP_OK;
if ((soap->error = data->fget(soap))) /* call user-defined HTTP GET handler */
{ /* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_fail++;
return soap->error;
}
/* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_get++;
return SOAP_STOP; /* stop processing the request and do not return SOAP Fault */
}
else
{ /* update should be in mutex, but we don't mind some inaccuracy in the count */
data->stat_fail++;
}
return soap->error;
}
/******************************************************************************/
int soap_get_connect(struct soap *soap, const char *endpoint, const char *action)
{ return soap_connect_command(soap, SOAP_GET, endpoint, action);
}
char *query(struct soap *soap)
{ return strchr(soap->path, '?');
}
char *query_key(struct soap *soap, char **s)
{ char *t = *s;
if (t && *t)
{ *s = (char*)soap_decode_string(t, strlen(t), t + 1);
return t;
}
return *s = NULL;
}
char *query_val(struct soap *soap, char **s)
{ char *t = *s;
if (t && *t == '=')
{ *s = (char*)soap_decode_string(t, strlen(t), t + 1);
return t;
}
return NULL;
}
int soap_encode_string(const char *s, char *t, size_t len)
{ register int c;
register size_t n = len;
while ((c = *s++) && n-- > 1)
{ if (c == ' ')
*t++ = '+';
else if (c == '!'
|| c == '$'
|| (c >= '(' && c <= '.')
|| (c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'Z')
|| c == '_'
|| (c >= 'a' && c <= 'z'))
*t++ = (char)c;
else if (n > 2)
{ *t++ = '%';
*t++ = (char)((c >> 4) + (c > 159 ? '7' : '0'));
c &= 0xF;
*t++ = (char)(c + (c > 9 ? '7' : '0'));
n -= 2;
}
else
break;
}
*t = '\0';
return len - n;
}
const char* soap_decode_string(char *buf, size_t len, const char *val)
{ const char *s;
char *t;
for (s = val; *s; s++)
if (*s != ' ' && *s != '=')
break;
if (*s == '"')
{ t = buf;
s++;
while (*s && *s != '"' && --len)
*t++ = *s++;
*t = '\0';
do s++;
while (*s && *s != '&' && *s != '=');
}
else
{ t = buf;
while (*s && *s != '&' && *s != '=' && --len)
{ switch (*s)
{ case '+':
*t++ = ' ';
case ' ':
s++;
break;
case '%':
*t++ = ((s[1] >= 'A' ? (s[1]&0x7) + 9 : s[1] - '0') << 4) + (s[2] >= 'A' ? (s[2]&0x7) + 9 : s[2] - '0');
s += 3;
break;
default:
*t++ = *s++;
}
}
*t = '\0';
}
return s;
}
/******************************************************************************/
#ifdef __cplusplus
}
#endif
+9 -13
View File
@@ -8,7 +8,7 @@
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved. Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
This part of the software is released under ONE of the following licenses: This part of the software is released under ONE of the following licenses:
GPL, the gSOAP public license, OR Genivia's license for commercial use. GPL or the gSOAP public license.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
gSOAP public license. gSOAP public license.
@@ -55,31 +55,27 @@ compiling, linking, and/or using OpenSSL is allowed.
extern "C" { extern "C" {
#endif #endif
#define HTTP_GET_ID "HTTP-GET-1.1" /* plugin identification */ #define HTTP_GET_ID "SOAP-HTTP-GET/2.1" /* plugin identification */
extern const char http_get_id[]; extern const char http_get_id[];
/* This is the local plugin data shared among all copies of the soap struct: */ /* This is the local plugin data shared among all copies of the soap struct: */
struct http_get_data struct http_get_data
{ int (*fparse)(struct soap*); /* to save and call the internal HTTP header parser */ {
int (*fparse)(struct soap*); /* to save and call the internal HTTP header parser */
int (*fget)(struct soap*); /* user-defined server-side HTTP GET handler */ int (*fget)(struct soap*); /* user-defined server-side HTTP GET handler */
size_t stat_get; /* HTTP GET usage statistics */ size_t stat_get; /* HTTP GET usage statistics */
size_t stat_post; /* HTTP POST usage statistics */ size_t stat_post; /* HTTP POST usage statistics */
size_t stat_fail; /* HTTP failure statistics */ size_t stat_fail; /* HTTP failure statistics */
size_t min[60]; /* Hits by the minute */ size_t hist_min[60]; /* Hits by the minute */
size_t hour[24]; /* Hits by the hour */ size_t hist_hour[24]; /* Hits by the hour */
size_t day[366]; /* Hits by day */ size_t hist_day[366]; /* Hits by day */
}; };
int http_get(struct soap*, struct soap_plugin*, void*); int http_get(struct soap*, struct soap_plugin*, void*);
int soap_get_connect(struct soap*, const char*, const char*); int soap_http_get_connect(struct soap*, const char*, const char*);
char *query(struct soap*); void soap_http_get_stats(struct soap *soap, size_t *stat_get, size_t *stat_post, size_t *stat_fail, size_t **hist_min, size_t **hist_hour, size_t **hist_day);
char *query_key(struct soap*, char**);
char *query_val(struct soap*, char**);
int soap_encode_string(const char*, char*, size_t);
const char* soap_decode_string(char*, size_t, const char*);
#ifdef __cplusplus #ifdef __cplusplus
} }
+368
View File
@@ -0,0 +1,368 @@
/*
httppost.c
gSOAP HTTP POST/PUT/DELETE plugin for SOAP and non-SOAP payloads.
See instructions below.
Revisions:
register multiple POST content handlers, each for a content type
Note: multipart/related and multipart/form-data are already handled in gSOAP.
gSOAP XML Web services tools
Copyright (C) 2000-2018, Robert van Engelen, Genivia, Inc. All Rights Reserved.
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2018 Robert A. van Engelen, Genivia inc. All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
[email protected] / [email protected]
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
Compile & link with stand-alone gSOAP server.
Usage (server side):
Define a NULL-terminated array of type-handler pairs, each with a media
type and a the handler function:
struct http_post_handlers my_handlers[] = {
{ "application/json", json_post_handler },
{ "image/jpg", jpeg_post_handler },
{ "text/html", html_post_handler },
{ "POST", generic_POST_handler },
{ "PUT", generic_PUT_handler },
{ "PATCH", generic_PATCH_handler },
{ "DELETE", generic_DELETE_handler },
{ NULL }
};
A `generic_POST_handler`, when specified with a `"POST"` key entry in
the table, takes priority over `soap_serve()` if no `SOAPAction` HTTP
header is included in the message. This means that SOAP/XML messages
without a `SOAPAction` header will not be processed by `soap_serve()`!
Note that `*` and `-` can be used as wildcards to match any text and
any character, respectively:
{ "image*", image_post_handler },
{ "text*", text_post_handler },
{ "text/---", three_char_type_text_handler },
In the above, to be more accurate, we should use a slash / between
image and the wildcard * (which is not shown in the table above due to
compilers throwing a fit at the / and * combo in this comment block).
It is possible to specify other paramters that must match:
{ "text/html; charset=utf-8", html_post_handler },
Media types may have optional parameters after `;` such as `charset`
and `boundary`. These parameters can be matched by the media type
patterns in the table. Patterns that are more specific must precede
patterns that are less specific in the table. For example,
`"text/xml;*charset=utf-8*"` must precede `"text/xml"` which must
precede `"text*"`. Note that `"text/xml"` also matches any parameters
of the media type of the message reveived, such as `"text/xml;
charset=utf-8"` (only since gSOAP version 2.8.75).
Each handler is a function that takes the soap context as a parameter
and returns SOAP_OK or an error code.
Register the plugin and the handlers:
struct soap soap;
soap_init(&soap);
soap_register_plugin_arg(&soap, http_post, my_handlers);
...
... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
...
soap_done(&soap); // delete plugin (calls plugin->fdelete)
A POST handler function is triggered by the media type in the
http_post_handlers table. Use http_http_get_body() as below to retrieve
HTTP POST body data:
int image_post_handler(struct soap *soap)
{
const char *buf;
size_t len;
// if necessary, check type in soap->http_content
if (soap->http_content && soap_tag_cmp(soap->http_content, "image/gif"))
return 404;
buf = soap_http_get_body(soap, &len);
if (!buf)
return soap->error;
soap_end_recv(soap);
... // process image in buf[0..len-1]
// reply with empty HTTP OK response:
return soap_send_empty_response(soap, SOAP_OK);
}
This function should also produce a valid HTTP response, for example:
if (we want to return HTML)
{
if (soap_response(soap, SOAP_HTML) // use this to return HTML...
|| soap_send(soap, "<HTML>...</HTML>"); // example HTML
|| ...
|| soap_end_send(soap))
return soap_closesock(soap);
return SOAP_OK;
}
else
{
soap->http_content = "image/jpeg"; // a jpeg image
if (soap_response(soap, SOAP_FILE) // SOAP_FILE sets custom http content
|| soap_send_raw(soap, ..., ...);
|| ...
|| soap_end_send(soap))
return soap_closesock(soap);
return SOAP_OK;
}
The soap_closesock() call only closes the connection when it shoud not
be kept alive. This function is called automatically after the handler
returns. There is no harm in calling this function more than once.
The soap_send(soap, char*) and soap_send_raw(soap, char*, size_t) can
be used to return content from server.
The soap_response(soap, SOAP_FILE) call returns a HTTP 200 OK response
with the HTTP content-type header set to soap->http_content. To return
a http error status code use soap_response(soap, SOAP_FILE + status)
with status between 200 and 599 or 0.
Usage (client side):
char *buf; // to hold the HTTP response body data
size_t len;
...
if (soap_post_connect(soap, "URL", "SOAP action or NULL", "media type")
|| soap_send(soap, ...)
|| soap_end_send(soap))
... // error
if (soap_begin_recv(&soap)
|| soap_http_body(&soap, &buf, &len)
|| soap_end_recv(&soap))
... // error
... // use buf[0..len-1]
soap_closesock(soap); // close, but keep open only with HTTP keep-alive
soap_end(soap); // also deletes buf content
The soap_send(soap, char*) and soap_send_raw(soap, char*, size_t) can
be used to send content to the server as shown above.
*/
#include "httppost.h"
#ifdef __cplusplus
extern "C" {
#endif
const char http_post_id[] = HTTP_POST_ID;
static int http_post_init(struct soap *soap, struct http_post_data *data, struct http_post_handlers *handlers);
static void http_post_delete(struct soap *soap, struct soap_plugin *p);
static int http_post_parse_header(struct soap *soap, const char*, const char*);
static http_handler_t http_lookup_handler(struct soap *soap, const char *type, struct http_post_data *data);
static int http_fput(struct soap *soap);
static int http_fpatch(struct soap *soap);
static int http_fdel(struct soap *soap);
int http_post(struct soap *soap, struct soap_plugin *p, void *arg)
{
p->id = http_post_id;
p->data = (void*)SOAP_MALLOC(soap, sizeof(struct http_post_data));
p->fdelete = http_post_delete;
if (!p->data)
return SOAP_EOM;
if (http_post_init(soap, (struct http_post_data*)p->data, (struct http_post_handlers *)arg))
{
SOAP_FREE(soap, p->data); /* error: could not init */
return SOAP_EOM; /* return error */
}
return SOAP_OK;
}
static int http_post_init(struct soap *soap, struct http_post_data *data, struct http_post_handlers *handlers)
{
data->fparsehdr = soap->fparsehdr; /* save old HTTP header parser callback */
soap->fparsehdr = http_post_parse_header; /* replace HTTP header parser callback with ours */
data->fput = soap->fput;
soap->fput = http_fput;
data->fpatch = soap->fpatch;
soap->fpatch = http_fpatch;
data->fdel = soap->fdel;
soap->fdel = http_fdel;
data->handlers = handlers;
return SOAP_OK;
}
static void http_post_delete(struct soap *soap, struct soap_plugin *p)
{
soap->fparsehdr = ((struct http_post_data*)p->data)->fparsehdr;
soap->fput = ((struct http_post_data*)p->data)->fput;
soap->fpatch = ((struct http_post_data*)p->data)->fpatch;
soap->fdel = ((struct http_post_data*)p->data)->fdel;
SOAP_FREE(soap, p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
}
static int http_post_parse_header(struct soap *soap, const char *key, const char *val)
{
struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
if (data->fparsehdr(soap, key, val)) /* parse HTTP header */
return soap->error;
if (!soap_tag_cmp(key, "Content-Type")) /* check content type */
soap->fform = http_lookup_handler(soap, val, data);
if (!soap->fform)
soap->fform = http_lookup_handler(soap, "POST", data);
return soap->error;
}
static http_handler_t http_lookup_handler(struct soap *soap, const char *type, struct http_post_data *data)
{
struct http_post_handlers *p;
const char *params = strchr(type, ';');
char temp[SOAP_HDRLEN];
(void)soap;
if (params)
{
size_t n = params - type;
soap_strncpy(temp, sizeof(temp), type, n);
temp[n] = '\0';
}
for (p = data->handlers; p && p->type; p++)
{
if (params)
{
if (strchr(p->type, ';'))
{
if (!soap_tag_cmp(type, p->type))
break;
}
else if (!soap_tag_cmp(temp, p->type))
{
break;
}
}
else if (!soap_tag_cmp(type, p->type))
{
break;
}
}
if (p && p->type)
{
DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Found HTTP POST plugin handler for '%s'\n", type));
return p->handler;
}
return NULL;
}
static int http_fput(struct soap *soap)
{
int (*fform)(struct soap*);
struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
fform = http_lookup_handler(soap, "PUT", data);
if (fform)
return fform(soap);
return data->fput(soap);
}
static int http_fpatch(struct soap *soap)
{
int (*fform)(struct soap*);
struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
fform = http_lookup_handler(soap, "PATCH", data);
if (fform)
return fform(soap);
return data->fpatch(soap);
}
static int http_fdel(struct soap *soap)
{
int (*fform)(struct soap*);
struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
fform = http_lookup_handler(soap, "DELETE", data);
if (fform)
return fform(soap);
return data->fdel(soap);
}
/******************************************************************************/
/* call soap_http_get_body to receive HTTP body and set buf and len */
int soap_http_body(struct soap *soap, char **buf, size_t *len)
{
*buf = soap_http_get_body(soap, len);
if (*buf)
return SOAP_OK;
return soap->error;
}
/******************************************************************************/
/* deprecated: use soap_POST instead */
int soap_post_connect(struct soap *soap, const char *endpoint, const char *action, const char *type)
{
return soap_POST(soap, endpoint, action, type);
}
/* deprecated: use soap_PUT instead */
int soap_put_connect(struct soap *soap, const char *endpoint, const char *action, const char *type)
{
return soap_PUT(soap, endpoint, action, type);
}
/* deprecated: use soap_DELETE instead */
int soap_delete_connect(struct soap *soap, const char *endpoint)
{
return soap_DELETE(soap, endpoint);
}
/******************************************************************************/
#ifdef __cplusplus
}
#endif
-312
View File
@@ -1,312 +0,0 @@
/*
httppost.c
gSOAP HTTP POST plugin for non-SOAP payloads.
See instructions below.
Revisions:
register multiple POST content handlers, each for a content type
Note: multipart/related and multipart/form-data are already handled in gSOAP.
gSOAP XML Web services tools
Copyright (C) 2004-2005, Robert van Engelen, Genivia, Inc. All Rights Reserved.
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
[email protected] / [email protected]
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
Compile & link with stand-alone gSOAP server.
Usage (server side):
Define a NULL-terminated array of type-handler pairs, each with a media
type and a the handler function:
struct http_post_handlers my_handlers[] =
{ { "image/jpg", jpeg_handler },
{ "image/ *", image_handler },
{ "text/html", html_handler },
{ "text/ *", text_handler },
{ "text/ *;*", text_handler },
{ "POST", generic_POST_handler },
{ "PUT", generic_PUT_handler },
{ "DELETE", generic_DELETE_handler },
{ NULL }
};
Note that '*' can be used as a wildcard and some media types may have
optional parameters (after ';').
Register the plugin and the handlers:
struct soap soap;
soap_init(&soap);
soap_register_plugin_arg(&soap, http_post, my_handlers);
...
... = soap_copy(&soap); // copies plugin too but not its data: plugin data is shared since fcopy is not set
...
soap_done(&soap); // detach plugin (calls plugin->fdelete)
A POST handler function is triggered by the media type in the
http_post_handlers table. Use http_copy_body() as below to retrieve
HTTP POST body data:
int image_handler(struct soap *soap)
{ const char *buf;
size_t len;
// if necessary, check type in soap->http_content
if (soap->http_content && !soap_tag_cmp(soap->http_content, "image/gif")
return 404;
if (!(buf = soap_get_http_body(soap, &len))
return soap->error;
soap_end_recv(soap);
// ... process image in buf[0..len-1]
// reply with empty HTTP OK response:
return soap_send_empty_response(soap, SOAP_OK);
}
This function should also produce a valid HTTP response, for example:
if (we want to return HTML)
soap_response(soap, SOAP_HTML); // use this to return HTML...
else
{ soap->http_content = "image/jpeg"; // a jpeg image
soap_response(soap, SOAP_FILE); // SOAP_FILE sets custom http content
}
...
soap_send(soap, "<HTML>...</HTML>"); // example HTML
...
soap_end_send(soap);
soap_closesock(soap); // close, but keep open only with HTTP keep-alive
The soap_send(soap, char*) and soap_send_raw(soap, char*, size_t) can
be used to return content from server.
Usage (client side):
char *buf; // to hold the HTTP response body data
size_t len;
...
if (soap_post_connect(soap, "URL", "SOAP action or NULL", "media type")
|| soap_send(soap, ...)
|| soap_end_send(soap))
... error ...
if (soap_begin_recv(&soap)
|| soap_http_body(&soap, &buf, &len)
|| soap_end_recv(&soap))
... error ...
// ... use buf[0..len-1]
soap_closesock(soap); // close, but keep open only with HTTP keep-alive
soap_end(soap); // also deletes buf content
The soap_send(soap, char*) and soap_send_raw(soap, char*, size_t) can
be used to send content to the server as shown above.
*/
#include "httppost.h"
#ifdef __cplusplus
extern "C" {
#endif
const char http_post_id[14] = HTTP_POST_ID;
static int http_post_init(struct soap *soap, struct http_post_data *data, struct http_post_handlers *handlers);
static void http_post_delete(struct soap *soap, struct soap_plugin *p);
static int http_post_parse_header(struct soap *soap, const char*, const char*);
static http_handler_t http_lookup_handler(struct soap *soap, const char *type, struct http_post_data *data);
static int http_fput(struct soap *soap);
static int http_fdel(struct soap *soap);
int http_post(struct soap *soap, struct soap_plugin *p, void *arg)
{ p->id = http_post_id;
p->data = (void*)malloc(sizeof(struct http_post_data));
p->fdelete = http_post_delete;
if (p->data)
if (http_post_init(soap, (struct http_post_data*)p->data, (struct http_post_handlers *)arg))
{ free(p->data); /* error: could not init */
return SOAP_EOM; /* return error */
}
return SOAP_OK;
}
static int http_post_init(struct soap *soap, struct http_post_data *data, struct http_post_handlers *handlers)
{ data->fparsehdr = soap->fparsehdr; /* save old HTTP header parser callback */
soap->fparsehdr = http_post_parse_header; /* replace HTTP header parser callback with ours */
data->fput = soap->fput;
soap->fput = http_fput;
data->fdel = soap->fdel;
soap->fdel = http_fdel;
data->handlers = handlers;
return SOAP_OK;
}
static void http_post_delete(struct soap *soap, struct soap_plugin *p)
{ soap->fparsehdr = ((struct http_post_data*)p->data)->fparsehdr;
soap->fput = ((struct http_post_data*)p->data)->fput;
soap->fdel = ((struct http_post_data*)p->data)->fdel;
free(p->data); /* free allocated plugin data (this function is not called for shared plugin data, but only when the final soap_done() is invoked on the original soap struct) */
}
static int http_post_parse_header(struct soap *soap, const char *key, const char *val)
{ struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
soap->error = data->fparsehdr(soap, key, val); /* parse HTTP header */
if (soap->error == SOAP_OK)
{ if (!soap_tag_cmp(key, "Content-Type"))
{ /* check content type */
soap->fform = http_lookup_handler(soap, val, data);
if (!soap->fform)
soap->fform = http_lookup_handler(soap, "POST", data);
if (soap->fform)
return SOAP_FORM; /* calls soap->fform after processing the HTTP header */
}
}
return soap->error;
}
static http_handler_t http_lookup_handler(struct soap *soap, const char *type, struct http_post_data *data)
{ struct http_post_handlers *p;
for (p = data->handlers; p && p->type; p++)
{ if (!soap_tag_cmp(type, p->type))
{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Found HTTP POST plugin handler for '%s'\n", type));
return p->handler;
}
}
return NULL;
}
static int http_fput(struct soap *soap)
{ struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
soap->fform = http_lookup_handler(soap, "PUT", data);
if (soap->fform)
return SOAP_FORM;
return 405;
}
static int http_fdel(struct soap *soap)
{ struct http_post_data *data = (struct http_post_data*)soap_lookup_plugin(soap, http_post_id);
if (!data)
return SOAP_PLUGIN_ERROR;
soap->fform = http_lookup_handler(soap, "DELETE", data);
if (soap->fform)
return SOAP_STOP;
return 405;
}
/******************************************************************************/
int soap_post_connect(struct soap *soap, const char *endpoint, const char *action, const char *type)
{ if ((soap->omode & SOAP_IO) != SOAP_IO_CHUNK) /* not chunking: store in buf */
soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
soap->http_content = type;
return soap_connect_command(soap, SOAP_POST_FILE, endpoint, action);
}
int soap_put_connect(struct soap *soap, const char *endpoint, const char *action, const char *type)
{ if ((soap->omode & SOAP_IO) != SOAP_IO_CHUNK) /* not chunking: store in buf */
soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE;
soap->http_content = type;
return soap_connect_command(soap, SOAP_PUT, endpoint, action);
}
int soap_delete_connect(struct soap *soap, const char *endpoint, const char *action, const char *type)
{ if (soap_connect_command(soap, SOAP_DEL, endpoint, action)
|| soap_end_send(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}
int soap_http_body(struct soap *soap, char **buf, size_t *len)
{ char *s = *buf = NULL;
*len = 0;
/* It is unlikely chunked and/or compressed POST messages are sent by browsers, but we need to handle them */
if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK
#ifdef WITH_ZLIB
|| soap->zlib_in != SOAP_ZLIB_NONE
#endif
)
{ register size_t k;
soap_wchar c = EOF;
soap->labidx = 0;
do
{ if (soap_append_lab(soap, NULL, 0))
return soap->error;
s = soap->labbuf + soap->labidx;
k = soap->lablen - soap->labidx;
soap->labidx = soap->lablen;
while (k--)
{ if ((c = soap_getchar(soap)) == (int)EOF)
break;
*s++ = c;
}
} while (c != (int)EOF);
*len = soap->lablen - k - 1;
*buf = (char*)soap_malloc(soap, *len + 1);
memcpy(*buf, soap->labbuf, *len + 1);
}
else
{ if (soap->length)
{ s = (char*)soap_malloc(soap, soap->length + 1);
if (s)
{ char *t = s;
size_t i;
for (i = soap->length; i; i--)
{ soap_wchar c;
if ((c = soap_getchar(soap)) == (int)EOF)
return soap->error = SOAP_EOF;
*t++ = c;
}
*t = '\0';
}
}
*buf = s;
*len = soap->length;
}
return soap_end_recv(soap);
}
/******************************************************************************/
#ifdef __cplusplus
}
#endif
+17 -14
View File
@@ -1,15 +1,15 @@
/* /*
httppost.h httppost.h
gSOAP HTTP POST plugin for non-SOAP payloads. gSOAP HTTP POST plugin for non-SOAP payloads.
See httppost.c for instructions. See httppost.c for instructions.
Revisions: Revisions:
register multiple POST content handlers, each for a content type register multiple POST content handlers, each for a content type
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2004-2009, Robert van Engelen, Genivia, Inc. All Rights Reserved. Copyright (C) 2000-2018, Robert van Engelen, Genivia, Inc. All Rights Reserved.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
gSOAP public license. gSOAP public license.
@@ -57,21 +57,24 @@ compiling, linking, and/or using OpenSSL is allowed.
extern "C" { extern "C" {
#endif #endif
#define HTTP_POST_ID "HTTP-POST-1.1" /* plugin identification */ #define HTTP_POST_ID "SOAP-HTTP-POST/2.2" /* plugin identification */
extern const char http_post_id[]; extern const char http_post_id[];
typedef int (*http_handler_t)(struct soap*); typedef int (*http_handler_t)(struct soap*);
struct http_post_handlers struct http_post_handlers
{ const char *type; {
const char *type;
http_handler_t handler; http_handler_t handler;
}; };
/* This is the local plugin data shared among all copies of the soap struct: */ /* This is the local plugin data shared among all copies of the soap struct: */
struct http_post_data struct http_post_data
{ int (*fparsehdr)(struct soap*, const char*, const char*); /* to save and call the internal HTTP header parser */ {
int (*fparsehdr)(struct soap*, const char*, const char*); /* to save and call the internal HTTP header parser */
int (*fput)(struct soap*); /* to save */ int (*fput)(struct soap*); /* to save */
int (*fpatch)(struct soap*); /* to save */
int (*fdel)(struct soap*); /* to save */ int (*fdel)(struct soap*); /* to save */
struct http_post_handlers *handlers; /* the server-side POST content type handlers */ struct http_post_handlers *handlers; /* the server-side POST content type handlers */
}; };
@@ -79,16 +82,16 @@ struct http_post_data
/* the http post plugin, note: argument should be a table of type-handler pairs */ /* the http post plugin, note: argument should be a table of type-handler pairs */
int http_post(struct soap*, struct soap_plugin*, void*); int http_post(struct soap*, struct soap_plugin*, void*);
/* a function to send HTTP POST, should be followd by a soap_send to transmit and soap_get_http_body to retrieve the HTTP body returned into an internal buffer */ /* deprecated: use soap_POST instead */
int soap_post_connect(struct soap*, const char *endpoint, const char *action, const char *type); int soap_post_connect(struct soap*, const char *endpoint, const char *action, const char *type);
/* a function to send HTTP PUT, should be followed by a soap_send to transmit data */ /* deprecated: use soap_PUT instead */
int soap_put_connect(struct soap*, const char *endpoint, const char *action, const char *type); int soap_put_connect(struct soap*, const char *endpoint, const char *action, const char *type);
/* a function to send HTTP DELETE */ /* deprecated: use soap_DELETE instead */
int soap_delete_connect(struct soap*, const char *endpoint, const char *action, const char *type); int soap_delete_connect(struct soap*, const char *endpoint);
/* a function to retrieve the HTTP body into an internal buffer */ /* deprecated: use soap_get_http_body instead */
int soap_http_body(struct soap*, char **buf, size_t *len); int soap_http_body(struct soap*, char **buf, size_t *len);
#ifdef __cplusplus #ifdef __cplusplus
+174 -128
View File
@@ -1,8 +1,8 @@
/* soapC.cpp /* soapC.cpp
Generated by gSOAP 2.8.49 for gsoap.stub Generated by gSOAP 2.8.117 for gsoap.stub
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2000-2017, Robert van Engelen, Genivia Inc. All Rights Reserved. Copyright (C) 2000-2021, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL. The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed. compiling, linking, and/or using OpenSSL is allowed.
@@ -18,7 +18,7 @@ A commercial use license is available from Genivia Inc., [email protected]
#include "soapH.h" #include "soapH.h"
SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.49 2017-07-19 15:45:31 GMT") SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.117 2021-12-21 00:03:56 GMT")
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
@@ -59,24 +59,18 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap)
SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap)
{ {
if (soap->fault == NULL) if (soap->fault == NULL)
{ soap->fault = soap_new_SOAP_ENV__Fault(soap); { soap->fault = soap_new_SOAP_ENV__Fault(soap, -1);
if (soap->fault == NULL) if (soap->fault == NULL)
return; return;
soap_default_SOAP_ENV__Fault(soap, soap->fault);
}
if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)
{ soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap);
soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);
}
if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)
{ soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap);
soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);
} }
if (soap->version == 2 && soap->fault->SOAP_ENV__Code == NULL)
soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap, -1);
if (soap->version == 2 && soap->fault->SOAP_ENV__Reason == NULL)
soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap, -1);
} }
SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap) SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)
{ {
soap_fault(soap);
if (soap->fault) if (soap->fault)
soap_serialize_SOAP_ENV__Fault(soap, soap->fault); soap_serialize_SOAP_ENV__Fault(soap, soap->fault);
} }
@@ -96,6 +90,8 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap) SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap)
{ {
soap_fault(soap); soap_fault(soap);
if (soap->fault == NULL)
return NULL;
if (soap->version == 2 && soap->fault->SOAP_ENV__Code) if (soap->version == 2 && soap->fault->SOAP_ENV__Code)
return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value; return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;
return (const char**)(void*)&soap->fault->faultcode; return (const char**)(void*)&soap->fault->faultcode;
@@ -104,60 +100,60 @@ SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap)
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap) SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap)
{ {
soap_fault(soap); soap_fault(soap);
if (soap->version == 2) if (soap->fault == NULL)
return NULL;
if (soap->version == 2 && soap->fault->SOAP_ENV__Code)
{ if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL) { if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL)
{ soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap); { soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap, -1);
soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode); if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL)
return NULL;
} }
return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
} }
return (const char**)(void*)&soap->fault->faultcode; return (const char**)(void*)&soap->fault->faultcode;
} }
SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultsubcode(struct soap *soap) SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_subcode(struct soap *soap)
{ {
soap_fault(soap); const char **s = soap_faultsubcode(soap);
if (soap->version == 2) return s ? *s : NULL;
{ if (soap->fault->SOAP_ENV__Code && soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)
return soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
return NULL;
}
return soap->fault->faultcode;
} }
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap) SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap)
{ {
soap_fault(soap); soap_fault(soap);
if (soap->version == 2) if (soap->fault == NULL)
return NULL;
if (soap->version == 2 && soap->fault->SOAP_ENV__Reason)
return (const char**)(void*)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text; return (const char**)(void*)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;
return (const char**)(void*)&soap->fault->faultstring; return (const char**)(void*)&soap->fault->faultstring;
} }
SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_string(struct soap *soap)
{
const char **s = soap_faultstring(soap);
return s ? *s : NULL;
}
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap) SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap)
{ {
soap_fault(soap); soap_fault(soap);
if (soap->fault == NULL)
return NULL;
if (soap->version == 2) if (soap->version == 2)
{ if (soap->fault->SOAP_ENV__Detail == NULL) { if (soap->fault->SOAP_ENV__Detail == NULL)
{ soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap); soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap, -1);
soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail);
}
return (const char**)(void*)&soap->fault->SOAP_ENV__Detail->__any; return (const char**)(void*)&soap->fault->SOAP_ENV__Detail->__any;
} }
if (soap->fault->detail == NULL) if (soap->fault->detail == NULL)
{ soap->fault->detail = soap_new_SOAP_ENV__Detail(soap); soap->fault->detail = soap_new_SOAP_ENV__Detail(soap, -1);
soap_default_SOAP_ENV__Detail(soap, soap->fault->detail);
}
return (const char**)(void*)&soap->fault->detail->__any; return (const char**)(void*)&soap->fault->detail->__any;
} }
SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultdetail(struct soap *soap) SOAP_FMAC3 const char * SOAP_FMAC4 soap_fault_detail(struct soap *soap)
{ {
soap_fault(soap); const char **s = soap_faultdetail(soap);
if (soap->version == 2 && soap->fault->SOAP_ENV__Detail) return s ? *s : NULL;
return soap->fault->SOAP_ENV__Detail->__any;
if (soap->fault->detail)
return soap->fault->detail->__any;
return NULL;
} }
#endif #endif
@@ -168,7 +164,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap)
int t; int t;
if (soap->version == 1) if (soap->version == 1)
{ for (;;) { for (;;)
{ if (!soap_getelement(soap, &t)) { if (!soap_getelement(soap, NULL, &t))
if ((soap->error && soap->error != SOAP_TAG_MISMATCH) || soap_ignore_element(soap)) if ((soap->error && soap->error != SOAP_TAG_MISMATCH) || soap_ignore_element(soap))
break; break;
} }
@@ -182,7 +178,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type) SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, const char *tag, int *type)
{ (void)type; { (void)type;
if (soap_peek_element(soap)) if (soap_peek_element(soap))
return NULL; return NULL;
@@ -192,23 +188,23 @@ SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type)
switch (*type) switch (*type)
{ {
case SOAP_TYPE_byte: case SOAP_TYPE_byte:
return soap_in_byte(soap, NULL, NULL, "xsd:byte"); return soap_in_byte(soap, tag, NULL, "xsd:byte");
case SOAP_TYPE_int: case SOAP_TYPE_int:
return soap_in_int(soap, NULL, NULL, "xsd:int"); return soap_in_int(soap, tag, NULL, "xsd:int");
case SOAP_TYPE_ns1__executeCommand: case SOAP_TYPE_ns1__executeCommand:
return soap_in_ns1__executeCommand(soap, NULL, NULL, "ns1:executeCommand"); return soap_in_ns1__executeCommand(soap, tag, NULL, "ns1:executeCommand");
case SOAP_TYPE_ns1__executeCommandResponse: case SOAP_TYPE_ns1__executeCommandResponse:
return soap_in_ns1__executeCommandResponse(soap, NULL, NULL, "ns1:executeCommandResponse"); return soap_in_ns1__executeCommandResponse(soap, tag, NULL, "ns1:executeCommandResponse");
case SOAP_TYPE_PointerTostring: case SOAP_TYPE_PointerTostring:
return soap_in_PointerTostring(soap, NULL, NULL, "xsd:string"); return soap_in_PointerTostring(soap, tag, NULL, "xsd:string");
case SOAP_TYPE__QName: case SOAP_TYPE__QName:
{ char **s; { char **s;
s = soap_in__QName(soap, NULL, NULL, "xsd:QName"); s = soap_in__QName(soap, tag, NULL, "xsd:QName");
return s ? *s : NULL; return s ? *s : NULL;
} }
case SOAP_TYPE_string: case SOAP_TYPE_string:
{ char **s; { char **s;
s = soap_in_string(soap, NULL, NULL, "xsd:string"); s = soap_in_string(soap, tag, NULL, "xsd:string");
return s ? *s : NULL; return s ? *s : NULL;
} }
default: default:
@@ -220,30 +216,30 @@ SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type)
t = soap->tag; t = soap->tag;
if (!soap_match_tag(soap, t, "xsd:byte")) if (!soap_match_tag(soap, t, "xsd:byte"))
{ *type = SOAP_TYPE_byte; { *type = SOAP_TYPE_byte;
return soap_in_byte(soap, NULL, NULL, NULL); return soap_in_byte(soap, tag, NULL, NULL);
} }
if (!soap_match_tag(soap, t, "xsd:int")) if (!soap_match_tag(soap, t, "xsd:int"))
{ *type = SOAP_TYPE_int; { *type = SOAP_TYPE_int;
return soap_in_int(soap, NULL, NULL, NULL); return soap_in_int(soap, tag, NULL, NULL);
} }
if (!soap_match_tag(soap, t, "ns1:executeCommand")) if (!soap_match_tag(soap, t, "ns1:executeCommand"))
{ *type = SOAP_TYPE_ns1__executeCommand; { *type = SOAP_TYPE_ns1__executeCommand;
return soap_in_ns1__executeCommand(soap, NULL, NULL, NULL); return soap_in_ns1__executeCommand(soap, tag, NULL, NULL);
} }
if (!soap_match_tag(soap, t, "ns1:executeCommandResponse")) if (!soap_match_tag(soap, t, "ns1:executeCommandResponse"))
{ *type = SOAP_TYPE_ns1__executeCommandResponse; { *type = SOAP_TYPE_ns1__executeCommandResponse;
return soap_in_ns1__executeCommandResponse(soap, NULL, NULL, NULL); return soap_in_ns1__executeCommandResponse(soap, tag, NULL, NULL);
} }
if (!soap_match_tag(soap, t, "xsd:QName")) if (!soap_match_tag(soap, t, "xsd:QName"))
{ char **s; { char **s;
*type = SOAP_TYPE__QName; *type = SOAP_TYPE__QName;
s = soap_in__QName(soap, NULL, NULL, NULL); s = soap_in__QName(soap, tag, NULL, NULL);
return s ? *s : NULL; return s ? *s : NULL;
} }
if (!soap_match_tag(soap, t, "xsd:string")) if (!soap_match_tag(soap, t, "xsd:string"))
{ char **s; { char **s;
*type = SOAP_TYPE_string; *type = SOAP_TYPE_string;
s = soap_in_string(soap, NULL, NULL, NULL); s = soap_in_string(soap, tag, NULL, NULL);
return s ? *s : NULL; return s ? *s : NULL;
} }
t = soap->tag; t = soap->tag;
@@ -263,25 +259,22 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap)
{ {
if (!soap_peek_element(soap)) if (!soap_peek_element(soap))
{ int t; { int t;
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input (level = %u, %d)\n", soap->tag, soap->level, soap->body)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input at level = %u body = %d)\n", soap->tag, soap->level, soap->body));
if (soap->mustUnderstand && !soap->other && !soap->fignore) if (soap->mustUnderstand && !soap->other && !soap->fignore)
return soap->error = SOAP_MUSTUNDERSTAND; return soap->error = SOAP_MUSTUNDERSTAND;
if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:")) if (((soap->mode & SOAP_XML_STRICT) && !soap->fignore && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:"))
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag)); { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag));
return soap->error = SOAP_TAG_MISMATCH; return soap->error = SOAP_TAG_MISMATCH;
} }
if (!*soap->id || !soap_getelement(soap, &t)) if (!*soap->id || !soap_getelement(soap, NULL, &t))
{ soap->peeked = 0; { soap->peeked = 0;
if (soap->fignore) if (soap->fignore)
soap->error = soap->fignore(soap, soap->tag); soap->error = soap->fignore(soap, soap->tag);
else else
soap->error = SOAP_OK; soap->error = SOAP_OK;
DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag)); DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag));
if (!soap->error && soap->body) if (!soap->error && soap->body && soap_ignore(soap))
{ soap->level++; return soap->error;
if (soap_ignore(soap) || soap_element_end_in(soap, NULL))
return soap->error;
}
} }
} }
return soap->error; return soap->error;
@@ -323,8 +316,11 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, co
return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:QName"); return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:QName");
case SOAP_TYPE_string: case SOAP_TYPE_string:
return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:string"); return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:string");
case 0:
return SOAP_OK;
} }
return SOAP_OK; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_putelement '%s' failed for type %d in soapC.cpp\n", tag ? tag : "", type));
return soap_element_empty(soap, tag, 0, NULL); /* unknown type to serialize */
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
@@ -417,59 +413,63 @@ SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap *soap, int t, const ch
return NULL; return NULL;
} }
SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist *p) SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap *soap, struct soap_clist *p)
{ switch (p->type) {
(void)soap; /* appease -Wall -Werror */
if (!p->ptr)
return SOAP_OK;
switch (p->type)
{ {
case SOAP_TYPE_ns1__executeCommandResponse: case SOAP_TYPE_ns1__executeCommandResponse:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct ns1__executeCommandResponse*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct ns1__executeCommandResponse*>(p->ptr), struct ns1__executeCommandResponse);
else else
SOAP_DELETE_ARRAY(static_cast<struct ns1__executeCommandResponse*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct ns1__executeCommandResponse*>(p->ptr), struct ns1__executeCommandResponse);
break; break;
case SOAP_TYPE_ns1__executeCommand: case SOAP_TYPE_ns1__executeCommand:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct ns1__executeCommand*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct ns1__executeCommand*>(p->ptr), struct ns1__executeCommand);
else else
SOAP_DELETE_ARRAY(static_cast<struct ns1__executeCommand*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct ns1__executeCommand*>(p->ptr), struct ns1__executeCommand);
break; break;
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
case SOAP_TYPE_SOAP_ENV__Header: case SOAP_TYPE_SOAP_ENV__Header:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct SOAP_ENV__Header*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct SOAP_ENV__Header*>(p->ptr), struct SOAP_ENV__Header);
else else
SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Header*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct SOAP_ENV__Header*>(p->ptr), struct SOAP_ENV__Header);
break; break;
#endif #endif
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
case SOAP_TYPE_SOAP_ENV__Code: case SOAP_TYPE_SOAP_ENV__Code:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct SOAP_ENV__Code*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct SOAP_ENV__Code*>(p->ptr), struct SOAP_ENV__Code);
else else
SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Code*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct SOAP_ENV__Code*>(p->ptr), struct SOAP_ENV__Code);
break; break;
#endif #endif
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
case SOAP_TYPE_SOAP_ENV__Detail: case SOAP_TYPE_SOAP_ENV__Detail:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct SOAP_ENV__Detail*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct SOAP_ENV__Detail*>(p->ptr), struct SOAP_ENV__Detail);
else else
SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Detail*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct SOAP_ENV__Detail*>(p->ptr), struct SOAP_ENV__Detail);
break; break;
#endif #endif
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
case SOAP_TYPE_SOAP_ENV__Reason: case SOAP_TYPE_SOAP_ENV__Reason:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct SOAP_ENV__Reason*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct SOAP_ENV__Reason*>(p->ptr), struct SOAP_ENV__Reason);
else else
SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Reason*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct SOAP_ENV__Reason*>(p->ptr), struct SOAP_ENV__Reason);
break; break;
#endif #endif
#ifndef WITH_NOGLOBAL #ifndef WITH_NOGLOBAL
case SOAP_TYPE_SOAP_ENV__Fault: case SOAP_TYPE_SOAP_ENV__Fault:
if (p->size < 0) if (p->size < 0)
SOAP_DELETE(static_cast<struct SOAP_ENV__Fault*>(p->ptr)); SOAP_DELETE(soap, static_cast<struct SOAP_ENV__Fault*>(p->ptr), struct SOAP_ENV__Fault);
else else
SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Fault*>(p->ptr)); SOAP_DELETE_ARRAY(soap, static_cast<struct SOAP_ENV__Fault*>(p->ptr), struct SOAP_ENV__Fault);
break; break;
#endif #endif
default: default:
@@ -485,14 +485,8 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist *p)
#endif #endif
SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int t, int b) SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int t, int b)
{ {
do (void)t; (void)b; /* appease -Wall -Werror */
{ switch (t) return 0;
{
default: return 0;
}
}
while (t != b);
return 1;
} }
#ifdef WIN32 #ifdef WIN32
#pragma warning(pop) #pragma warning(pop)
@@ -548,7 +542,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap *soap, int t, int tt, void *
break; break;
#endif #endif
default: default:
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not insert type = %d in %d\n", t, tt)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not insert type=%d in %d\n", t, tt));
} }
} }
#ifdef WIN32 #ifdef WIN32
@@ -658,7 +652,8 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, con
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type) SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type)
{ {
const char *soap_tmp_faultcode = soap_QName2s(soap, a->faultcode); const char *soap_tmp_faultcode;
soap_tmp_faultcode = soap_QName2s(soap, a->faultcode);
(void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type)) if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type))
return soap->error; return soap->error;
@@ -694,9 +689,10 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so
size_t soap_flag_SOAP_ENV__Node = 1; size_t soap_flag_SOAP_ENV__Node = 1;
size_t soap_flag_SOAP_ENV__Role = 1; size_t soap_flag_SOAP_ENV__Role = 1;
size_t soap_flag_SOAP_ENV__Detail = 1; size_t soap_flag_SOAP_ENV__Detail = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct SOAP_ENV__Fault*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_SOAP_ENV__Fault(soap, a); soap_default_SOAP_ENV__Fault(soap, a);
@@ -782,17 +778,23 @@ SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct SOAP_ENV__Fault *p; struct SOAP_ENV__Fault *p;
size_t k = sizeof(struct SOAP_ENV__Fault); size_t k = sizeof(struct SOAP_ENV__Fault);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct SOAP_ENV__Fault); { p = SOAP_NEW(soap, struct SOAP_ENV__Fault);
} }
else else
{ p = SOAP_NEW_ARRAY(struct SOAP_ENV__Fault, n); { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Fault, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Fault location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Fault location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -844,9 +846,10 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap *soap, const cha
SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason *a, const char *type) SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason *a, const char *type)
{ {
size_t soap_flag_SOAP_ENV__Text = 1; size_t soap_flag_SOAP_ENV__Text = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct SOAP_ENV__Reason *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct SOAP_ENV__Reason*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_SOAP_ENV__Reason(soap, a); soap_default_SOAP_ENV__Reason(soap, a);
@@ -884,17 +887,23 @@ SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reaso
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct SOAP_ENV__Reason *p; struct SOAP_ENV__Reason *p;
size_t k = sizeof(struct SOAP_ENV__Reason); size_t k = sizeof(struct SOAP_ENV__Reason);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct SOAP_ENV__Reason); { p = SOAP_NEW(soap, struct SOAP_ENV__Reason);
} }
else else
{ p = SOAP_NEW_ARRAY(struct SOAP_ENV__Reason, n); { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Reason, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Reason location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Reason location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -938,7 +947,8 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap *soap, const cha
(void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type)) if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type))
return soap->error; return soap->error;
soap_outliteral(soap, "-any", (char*const*)&a->__any, NULL); if (soap_outliteral(soap, "-any", (char*const*)&a->__any, NULL))
return soap->error;
if (soap_putelement(soap, a->fault, "fault", -1, a->__type)) if (soap_putelement(soap, a->fault, "fault", -1, a->__type))
return soap->error; return soap->error;
return soap_element_end_out(soap, tag); return soap_element_end_out(soap, tag);
@@ -948,9 +958,10 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct
{ {
size_t soap_flag___any = 1; size_t soap_flag___any = 1;
size_t soap_flag_fault = 1; size_t soap_flag_fault = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct SOAP_ENV__Detail *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct SOAP_ENV__Detail*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_SOAP_ENV__Detail(soap, a); soap_default_SOAP_ENV__Detail(soap, a);
@@ -959,7 +970,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct
for (;;) for (;;)
{ soap->error = SOAP_TAG_MISMATCH; { soap->error = SOAP_TAG_MISMATCH;
if (soap_flag_fault && soap->error == SOAP_TAG_MISMATCH) if (soap_flag_fault && soap->error == SOAP_TAG_MISMATCH)
{ if ((a->fault = soap_getelement(soap, &a->__type))) { if ((a->fault = soap_getelement(soap, "fault", &a->__type)))
{ soap_flag_fault = 0; { soap_flag_fault = 0;
continue; continue;
} }
@@ -994,17 +1005,23 @@ SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detai
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct SOAP_ENV__Detail *p; struct SOAP_ENV__Detail *p;
size_t k = sizeof(struct SOAP_ENV__Detail); size_t k = sizeof(struct SOAP_ENV__Detail);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct SOAP_ENV__Detail); { p = SOAP_NEW(soap, struct SOAP_ENV__Detail);
} }
else else
{ p = SOAP_NEW_ARRAY(struct SOAP_ENV__Detail, n); { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Detail, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Detail location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Detail location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -1045,7 +1062,8 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, cons
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type) SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type)
{ {
const char *soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value); const char *soap_tmp_SOAP_ENV__Value;
soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value);
(void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type)) if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type))
return soap->error; return soap->error;
@@ -1060,9 +1078,10 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap
{ {
size_t soap_flag_SOAP_ENV__Value = 1; size_t soap_flag_SOAP_ENV__Value = 1;
size_t soap_flag_SOAP_ENV__Subcode = 1; size_t soap_flag_SOAP_ENV__Subcode = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct SOAP_ENV__Code*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_SOAP_ENV__Code(soap, a); soap_default_SOAP_ENV__Code(soap, a);
@@ -1106,17 +1125,23 @@ SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(st
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct SOAP_ENV__Code *p; struct SOAP_ENV__Code *p;
size_t k = sizeof(struct SOAP_ENV__Code); size_t k = sizeof(struct SOAP_ENV__Code);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct SOAP_ENV__Code); { p = SOAP_NEW(soap, struct SOAP_ENV__Code);
} }
else else
{ p = SOAP_NEW_ARRAY(struct SOAP_ENV__Code, n); { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Code, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Code location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Code location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -1161,9 +1186,10 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const cha
SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type) SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap *soap, const char *tag, struct SOAP_ENV__Header *a, const char *type)
{ {
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct SOAP_ENV__Header*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_SOAP_ENV__Header(soap, a); soap_default_SOAP_ENV__Header(soap, a);
@@ -1195,17 +1221,23 @@ SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Heade
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct SOAP_ENV__Header *p; struct SOAP_ENV__Header *p;
size_t k = sizeof(struct SOAP_ENV__Header); size_t k = sizeof(struct SOAP_ENV__Header);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct SOAP_ENV__Header); { p = SOAP_NEW(soap, struct SOAP_ENV__Header);
} }
else else
{ p = SOAP_NEW_ARRAY(struct SOAP_ENV__Header, n); { p = SOAP_NEW_ARRAY(soap, struct SOAP_ENV__Header, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Header location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Header location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -1253,9 +1285,10 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommand(struct soap *soap, const
SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(struct soap *soap, const char *tag, struct ns1__executeCommand *a, const char *type) SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(struct soap *soap, const char *tag, struct ns1__executeCommand *a, const char *type)
{ {
size_t soap_flag_command = 1; size_t soap_flag_command = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct ns1__executeCommand *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommand, sizeof(struct ns1__executeCommand), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct ns1__executeCommand*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommand, sizeof(struct ns1__executeCommand), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_ns1__executeCommand(soap, a); soap_default_ns1__executeCommand(soap, a);
@@ -1293,17 +1326,23 @@ SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__execute
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct ns1__executeCommand *p; struct ns1__executeCommand *p;
size_t k = sizeof(struct ns1__executeCommand); size_t k = sizeof(struct ns1__executeCommand);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_ns1__executeCommand, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct ns1__executeCommand); { p = SOAP_NEW(soap, struct ns1__executeCommand);
} }
else else
{ p = SOAP_NEW_ARRAY(struct ns1__executeCommand, n); { p = SOAP_NEW_ARRAY(soap, struct ns1__executeCommand, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommand location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommand location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_ns1__executeCommand, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -1349,9 +1388,10 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommandResponse(struct soap *soap
SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeCommandResponse(struct soap *soap, const char *tag, struct ns1__executeCommandResponse *a, const char *type) SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeCommandResponse(struct soap *soap, const char *tag, struct ns1__executeCommandResponse *a, const char *type)
{ {
size_t soap_flag_result = 1; size_t soap_flag_result = 1;
if (soap_element_begin_in(soap, tag, 0, type)) if (soap_element_begin_in(soap, tag, 0, NULL))
return NULL; return NULL;
a = (struct ns1__executeCommandResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommandResponse, sizeof(struct ns1__executeCommandResponse), NULL, NULL, NULL, NULL); (void)type; /* appease -Wall -Werror */
a = (struct ns1__executeCommandResponse*)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommandResponse, sizeof(struct ns1__executeCommandResponse), NULL, NULL, NULL, NULL);
if (!a) if (!a)
return NULL; return NULL;
soap_default_ns1__executeCommandResponse(soap, a); soap_default_ns1__executeCommandResponse(soap, a);
@@ -1389,17 +1429,23 @@ SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1_
(void)type; (void)arrayType; /* appease -Wall -Werror */ (void)type; (void)arrayType; /* appease -Wall -Werror */
struct ns1__executeCommandResponse *p; struct ns1__executeCommandResponse *p;
size_t k = sizeof(struct ns1__executeCommandResponse); size_t k = sizeof(struct ns1__executeCommandResponse);
struct soap_clist *cp = soap_link(soap, SOAP_TYPE_ns1__executeCommandResponse, n, soap_fdelete);
if (!cp && soap && n != SOAP_NO_LINK_TO_DELETE)
return NULL;
if (n < 0) if (n < 0)
{ p = SOAP_NEW(struct ns1__executeCommandResponse); { p = SOAP_NEW(soap, struct ns1__executeCommandResponse);
} }
else else
{ p = SOAP_NEW_ARRAY(struct ns1__executeCommandResponse, n); { p = SOAP_NEW_ARRAY(soap, struct ns1__executeCommandResponse, n);
k *= n; k *= n;
} }
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommandResponse location=%p n=%d\n", (void*)p, n)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommandResponse location=%p n=%d\n", (void*)p, n));
soap_link(soap, p, SOAP_TYPE_ns1__executeCommandResponse, n, soap_fdelete);
if (size) if (size)
*size = k; *size = k;
if (!p)
soap->error = SOAP_EOM;
else if (cp)
cp->ptr = (void*)p;
return p; return p;
} }
@@ -1551,7 +1597,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, co
id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code, &mark); id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code, &mark);
if (id < 0) if (id < 0)
return soap->error; return soap->error;
soap_out_SOAP_ENV__Code(soap, tag, id, *a, type); (void)soap_out_SOAP_ENV__Code(soap, tag, id, *a, type);
soap_unmark(soap, mark); soap_unmark(soap, mark);
return soap->error; return soap->error;
} }
+259 -173
View File
@@ -1,8 +1,8 @@
/* soapH.h /* soapH.h
Generated by gSOAP 2.8.49 for gsoap.stub Generated by gSOAP 2.8.117 for gsoap.stub
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2000-2017, Robert van Engelen, Genivia Inc. All Rights Reserved. Copyright (C) 2000-2021, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL. The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed. compiling, linking, and/or using OpenSSL is allowed.
@@ -31,7 +31,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, int*); SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap*, const char*, int*);
SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int); SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
SOAP_FMAC3 void * SOAP_FMAC4 soap_dupelement(struct soap*, const void*, int); SOAP_FMAC3 void * SOAP_FMAC4 soap_dupelement(struct soap*, const void*, int);
SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void*, int); SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void*, int);
@@ -40,10 +40,8 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void*, int);
} }
#endif #endif
SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*); SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap);
SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*); SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*);
SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist*); SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap *soap, struct soap_clist*);
SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int, int); SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int, int);
SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap*, int, int, void*, size_t, const void*, void**); SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap*, int, int, void*, size_t, const void*, void**);
@@ -69,7 +67,7 @@ inline int soap_write_byte(struct soap *soap, char const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (p) if (p)
{ if (soap_begin_send(soap) || soap_put_byte(soap, p, "byte", "") || soap_end_send(soap)) { if (soap_begin_send(soap) || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -78,16 +76,24 @@ inline int soap_write_byte(struct soap *soap, char const*p)
inline int soap_PUT_byte(struct soap *soap, const char *URL, char const*p) inline int soap_PUT_byte(struct soap *soap, const char *URL, char const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || soap_put_byte(soap, p, "byte", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_byte(struct soap *soap, const char *URL, char const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_byte(struct soap *soap, const char *URL, char const*p) inline int soap_POST_send_byte(struct soap *soap, const char *URL, char const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || soap_put_byte(soap, p, "byte", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_byte(soap, p, "byte", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*); SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*);
@@ -95,7 +101,7 @@ SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, co
inline int soap_read_byte(struct soap *soap, char *p) inline int soap_read_byte(struct soap *soap, char *p)
{ {
if (p) if (p)
{ if (soap_begin_recv(soap) || soap_get_byte(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) { if (soap_begin_recv(soap) || ::soap_get_byte(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -103,16 +109,16 @@ inline int soap_read_byte(struct soap *soap, char *p)
inline int soap_GET_byte(struct soap *soap, const char *URL, char *p) inline int soap_GET_byte(struct soap *soap, const char *URL, char *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_byte(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_byte(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_byte(struct soap *soap, char *p) inline int soap_POST_recv_byte(struct soap *soap, char *p)
{ {
if (soap_read_byte(soap, p) || soap_closesock(soap)) if (::soap_read_byte(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -138,7 +144,7 @@ inline int soap_write_int(struct soap *soap, int const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (p) if (p)
{ if (soap_begin_send(soap) || soap_put_int(soap, p, "int", "") || soap_end_send(soap)) { if (soap_begin_send(soap) || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -147,16 +153,24 @@ inline int soap_write_int(struct soap *soap, int const*p)
inline int soap_PUT_int(struct soap *soap, const char *URL, int const*p) inline int soap_PUT_int(struct soap *soap, const char *URL, int const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || soap_put_int(soap, p, "int", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_int(struct soap *soap, const char *URL, int const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_int(struct soap *soap, const char *URL, int const*p) inline int soap_POST_send_int(struct soap *soap, const char *URL, int const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || soap_put_int(soap, p, "int", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_int(soap, p, "int", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*); SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*);
@@ -164,7 +178,7 @@ SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const
inline int soap_read_int(struct soap *soap, int *p) inline int soap_read_int(struct soap *soap, int *p)
{ {
if (p) if (p)
{ if (soap_begin_recv(soap) || soap_get_int(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) { if (soap_begin_recv(soap) || ::soap_get_int(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -172,16 +186,16 @@ inline int soap_read_int(struct soap *soap, int *p)
inline int soap_GET_int(struct soap *soap, const char *URL, int *p) inline int soap_GET_int(struct soap *soap, const char *URL, int *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_int(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_int(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_int(struct soap *soap, int *p) inline int soap_POST_recv_int(struct soap *soap, int *p)
{ {
if (soap_read_int(soap, p) || soap_closesock(soap)) if (::soap_read_int(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -203,9 +217,9 @@ inline struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap *soap, int
inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault( inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault(
struct soap *soap) struct soap *soap)
{ {
struct SOAP_ENV__Fault *_p = soap_new_SOAP_ENV__Fault(soap); struct SOAP_ENV__Fault *_p = ::soap_new_SOAP_ENV__Fault(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Fault(soap, _p); { ::soap_default_SOAP_ENV__Fault(soap, _p);
} }
return _p; return _p;
} }
@@ -222,9 +236,9 @@ inline struct SOAP_ENV__Fault * soap_new_set_SOAP_ENV__Fault(
char *SOAP_ENV__Role, char *SOAP_ENV__Role,
struct SOAP_ENV__Detail *SOAP_ENV__Detail) struct SOAP_ENV__Detail *SOAP_ENV__Detail)
{ {
struct SOAP_ENV__Fault *_p = soap_new_SOAP_ENV__Fault(soap); struct SOAP_ENV__Fault *_p = ::soap_new_SOAP_ENV__Fault(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Fault(soap, _p); { ::soap_default_SOAP_ENV__Fault(soap, _p);
_p->faultcode = faultcode; _p->faultcode = faultcode;
_p->faultstring = faultstring; _p->faultstring = faultstring;
_p->faultactor = faultactor; _p->faultactor = faultactor;
@@ -242,7 +256,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SO
inline int soap_write_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault const*p) inline int soap_write_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Fault(soap, p), 0) || soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -250,16 +264,24 @@ inline int soap_write_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault
inline int soap_PUT_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p) inline int soap_PUT_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_SOAP_ENV__Fault(soap, p), 0) || soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p) inline int soap_POST_send_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_SOAP_ENV__Fault(soap, p), 0) || soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Fault(soap, p), 0) || ::soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*); SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*);
@@ -267,8 +289,8 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct s
inline int soap_read_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) inline int soap_read_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p)
{ {
if (p) if (p)
{ soap_default_SOAP_ENV__Fault(soap, p); { ::soap_default_SOAP_ENV__Fault(soap, p);
if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Fault(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Fault(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -276,16 +298,16 @@ inline int soap_read_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *
inline int soap_GET_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault *p) inline int soap_GET_SOAP_ENV__Fault(struct soap *soap, const char *URL, struct SOAP_ENV__Fault *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_SOAP_ENV__Fault(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Fault(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) inline int soap_POST_recv_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p)
{ {
if (soap_read_SOAP_ENV__Fault(soap, p) || soap_closesock(soap)) if (::soap_read_SOAP_ENV__Fault(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -309,9 +331,9 @@ inline struct SOAP_ENV__Reason * soap_new_SOAP_ENV__Reason(struct soap *soap, in
inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason( inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason(
struct soap *soap) struct soap *soap)
{ {
struct SOAP_ENV__Reason *_p = soap_new_SOAP_ENV__Reason(soap); struct SOAP_ENV__Reason *_p = ::soap_new_SOAP_ENV__Reason(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Reason(soap, _p); { ::soap_default_SOAP_ENV__Reason(soap, _p);
} }
return _p; return _p;
} }
@@ -320,9 +342,9 @@ inline struct SOAP_ENV__Reason * soap_new_set_SOAP_ENV__Reason(
struct soap *soap, struct soap *soap,
char *SOAP_ENV__Text) char *SOAP_ENV__Text)
{ {
struct SOAP_ENV__Reason *_p = soap_new_SOAP_ENV__Reason(soap); struct SOAP_ENV__Reason *_p = ::soap_new_SOAP_ENV__Reason(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Reason(soap, _p); { ::soap_default_SOAP_ENV__Reason(soap, _p);
_p->SOAP_ENV__Text = SOAP_ENV__Text; _p->SOAP_ENV__Text = SOAP_ENV__Text;
} }
return _p; return _p;
@@ -332,7 +354,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct S
inline int soap_write_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason const*p) inline int soap_write_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Reason(soap, p), 0) || soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -340,16 +362,24 @@ inline int soap_write_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reaso
inline int soap_PUT_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p) inline int soap_PUT_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_SOAP_ENV__Reason(soap, p), 0) || soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p) inline int soap_POST_send_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_SOAP_ENV__Reason(soap, p), 0) || soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Reason(soap, p), 0) || ::soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*); SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*);
@@ -357,8 +387,8 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct
inline int soap_read_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) inline int soap_read_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p)
{ {
if (p) if (p)
{ soap_default_SOAP_ENV__Reason(soap, p); { ::soap_default_SOAP_ENV__Reason(soap, p);
if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Reason(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Reason(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -366,16 +396,16 @@ inline int soap_read_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason
inline int soap_GET_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason *p) inline int soap_GET_SOAP_ENV__Reason(struct soap *soap, const char *URL, struct SOAP_ENV__Reason *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_SOAP_ENV__Reason(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Reason(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) inline int soap_POST_recv_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p)
{ {
if (soap_read_SOAP_ENV__Reason(soap, p) || soap_closesock(soap)) if (::soap_read_SOAP_ENV__Reason(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -401,9 +431,9 @@ inline struct SOAP_ENV__Detail * soap_new_req_SOAP_ENV__Detail(
int __type, int __type,
void *fault) void *fault)
{ {
struct SOAP_ENV__Detail *_p = soap_new_SOAP_ENV__Detail(soap); struct SOAP_ENV__Detail *_p = ::soap_new_SOAP_ENV__Detail(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Detail(soap, _p); { ::soap_default_SOAP_ENV__Detail(soap, _p);
_p->__type = __type; _p->__type = __type;
_p->fault = fault; _p->fault = fault;
} }
@@ -416,9 +446,9 @@ inline struct SOAP_ENV__Detail * soap_new_set_SOAP_ENV__Detail(
int __type, int __type,
void *fault) void *fault)
{ {
struct SOAP_ENV__Detail *_p = soap_new_SOAP_ENV__Detail(soap); struct SOAP_ENV__Detail *_p = ::soap_new_SOAP_ENV__Detail(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Detail(soap, _p); { ::soap_default_SOAP_ENV__Detail(soap, _p);
_p->__any = __any; _p->__any = __any;
_p->__type = __type; _p->__type = __type;
_p->fault = fault; _p->fault = fault;
@@ -430,7 +460,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct S
inline int soap_write_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail const*p) inline int soap_write_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Detail(soap, p), 0) || soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -438,16 +468,24 @@ inline int soap_write_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detai
inline int soap_PUT_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p) inline int soap_PUT_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_SOAP_ENV__Detail(soap, p), 0) || soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p) inline int soap_POST_send_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_SOAP_ENV__Detail(soap, p), 0) || soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Detail(soap, p), 0) || ::soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*); SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*);
@@ -455,8 +493,8 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct
inline int soap_read_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) inline int soap_read_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p)
{ {
if (p) if (p)
{ soap_default_SOAP_ENV__Detail(soap, p); { ::soap_default_SOAP_ENV__Detail(soap, p);
if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Detail(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Detail(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -464,16 +502,16 @@ inline int soap_read_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail
inline int soap_GET_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail *p) inline int soap_GET_SOAP_ENV__Detail(struct soap *soap, const char *URL, struct SOAP_ENV__Detail *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_SOAP_ENV__Detail(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Detail(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) inline int soap_POST_recv_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p)
{ {
if (soap_read_SOAP_ENV__Detail(soap, p) || soap_closesock(soap)) if (::soap_read_SOAP_ENV__Detail(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -497,9 +535,9 @@ inline struct SOAP_ENV__Code * soap_new_SOAP_ENV__Code(struct soap *soap, int n
inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code( inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code(
struct soap *soap) struct soap *soap)
{ {
struct SOAP_ENV__Code *_p = soap_new_SOAP_ENV__Code(soap); struct SOAP_ENV__Code *_p = ::soap_new_SOAP_ENV__Code(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Code(soap, _p); { ::soap_default_SOAP_ENV__Code(soap, _p);
} }
return _p; return _p;
} }
@@ -509,9 +547,9 @@ inline struct SOAP_ENV__Code * soap_new_set_SOAP_ENV__Code(
char *SOAP_ENV__Value, char *SOAP_ENV__Value,
struct SOAP_ENV__Code *SOAP_ENV__Subcode) struct SOAP_ENV__Code *SOAP_ENV__Subcode)
{ {
struct SOAP_ENV__Code *_p = soap_new_SOAP_ENV__Code(soap); struct SOAP_ENV__Code *_p = ::soap_new_SOAP_ENV__Code(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Code(soap, _p); { ::soap_default_SOAP_ENV__Code(soap, _p);
_p->SOAP_ENV__Value = SOAP_ENV__Value; _p->SOAP_ENV__Value = SOAP_ENV__Value;
_p->SOAP_ENV__Subcode = SOAP_ENV__Subcode; _p->SOAP_ENV__Subcode = SOAP_ENV__Subcode;
} }
@@ -522,7 +560,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOA
inline int soap_write_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code const*p) inline int soap_write_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Code(soap, p), 0) || soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -530,16 +568,24 @@ inline int soap_write_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code co
inline int soap_PUT_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p) inline int soap_PUT_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_SOAP_ENV__Code(soap, p), 0) || soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p) inline int soap_POST_send_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_SOAP_ENV__Code(soap, p), 0) || soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Code(soap, p), 0) || ::soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*); SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*);
@@ -547,8 +593,8 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soa
inline int soap_read_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) inline int soap_read_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p)
{ {
if (p) if (p)
{ soap_default_SOAP_ENV__Code(soap, p); { ::soap_default_SOAP_ENV__Code(soap, p);
if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Code(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Code(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -556,16 +602,16 @@ inline int soap_read_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p)
inline int soap_GET_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code *p) inline int soap_GET_SOAP_ENV__Code(struct soap *soap, const char *URL, struct SOAP_ENV__Code *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_SOAP_ENV__Code(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Code(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) inline int soap_POST_recv_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p)
{ {
if (soap_read_SOAP_ENV__Code(soap, p) || soap_closesock(soap)) if (::soap_read_SOAP_ENV__Code(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -589,9 +635,9 @@ inline struct SOAP_ENV__Header * soap_new_SOAP_ENV__Header(struct soap *soap, in
inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header( inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header(
struct soap *soap) struct soap *soap)
{ {
struct SOAP_ENV__Header *_p = soap_new_SOAP_ENV__Header(soap); struct SOAP_ENV__Header *_p = ::soap_new_SOAP_ENV__Header(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Header(soap, _p); { ::soap_default_SOAP_ENV__Header(soap, _p);
} }
return _p; return _p;
} }
@@ -599,9 +645,9 @@ inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header(
inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header( inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header(
struct soap *soap) struct soap *soap)
{ {
struct SOAP_ENV__Header *_p = soap_new_SOAP_ENV__Header(soap); struct SOAP_ENV__Header *_p = ::soap_new_SOAP_ENV__Header(soap);
if (_p) if (_p)
{ soap_default_SOAP_ENV__Header(soap, _p); { ::soap_default_SOAP_ENV__Header(soap, _p);
} }
return _p; return _p;
} }
@@ -610,7 +656,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct S
inline int soap_write_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header const*p) inline int soap_write_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Header(soap, p), 0) || soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -618,16 +664,24 @@ inline int soap_write_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Heade
inline int soap_PUT_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p) inline int soap_PUT_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_SOAP_ENV__Header(soap, p), 0) || soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p) inline int soap_POST_send_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_SOAP_ENV__Header(soap, p), 0) || soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_SOAP_ENV__Header(soap, p), 0) || ::soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*); SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*);
@@ -635,8 +689,8 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct
inline int soap_read_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) inline int soap_read_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p)
{ {
if (p) if (p)
{ soap_default_SOAP_ENV__Header(soap, p); { ::soap_default_SOAP_ENV__Header(soap, p);
if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Header(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_SOAP_ENV__Header(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -644,16 +698,16 @@ inline int soap_read_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header
inline int soap_GET_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header *p) inline int soap_GET_SOAP_ENV__Header(struct soap *soap, const char *URL, struct SOAP_ENV__Header *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_SOAP_ENV__Header(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_SOAP_ENV__Header(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) inline int soap_POST_recv_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p)
{ {
if (soap_read_SOAP_ENV__Header(soap, p) || soap_closesock(soap)) if (::soap_read_SOAP_ENV__Header(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -675,9 +729,9 @@ inline struct ns1__executeCommand * soap_new_ns1__executeCommand(struct soap *so
inline struct ns1__executeCommand * soap_new_req_ns1__executeCommand( inline struct ns1__executeCommand * soap_new_req_ns1__executeCommand(
struct soap *soap) struct soap *soap)
{ {
struct ns1__executeCommand *_p = soap_new_ns1__executeCommand(soap); struct ns1__executeCommand *_p = ::soap_new_ns1__executeCommand(soap);
if (_p) if (_p)
{ soap_default_ns1__executeCommand(soap, _p); { ::soap_default_ns1__executeCommand(soap, _p);
} }
return _p; return _p;
} }
@@ -686,9 +740,9 @@ inline struct ns1__executeCommand * soap_new_set_ns1__executeCommand(
struct soap *soap, struct soap *soap,
char *command) char *command)
{ {
struct ns1__executeCommand *_p = soap_new_ns1__executeCommand(soap); struct ns1__executeCommand *_p = ::soap_new_ns1__executeCommand(soap);
if (_p) if (_p)
{ soap_default_ns1__executeCommand(soap, _p); { ::soap_default_ns1__executeCommand(soap, _p);
_p->command = command; _p->command = command;
} }
return _p; return _p;
@@ -698,7 +752,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommand(struct soap*, const struc
inline int soap_write_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand const*p) inline int soap_write_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_ns1__executeCommand(soap, p), 0) || soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_ns1__executeCommand(soap, p), 0) || ::soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -706,16 +760,24 @@ inline int soap_write_ns1__executeCommand(struct soap *soap, struct ns1__execute
inline int soap_PUT_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand const*p) inline int soap_PUT_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_ns1__executeCommand(soap, p), 0) || soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommand(soap, p), 0) || ::soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommand(soap, p), 0) || ::soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand const*p) inline int soap_POST_send_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_ns1__executeCommand(soap, p), 0) || soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommand(soap, p), 0) || ::soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand(struct soap*, struct ns1__executeCommand *, const char*, const char*); SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand(struct soap*, struct ns1__executeCommand *, const char*, const char*);
@@ -723,8 +785,8 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand(
inline int soap_read_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p) inline int soap_read_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p)
{ {
if (p) if (p)
{ soap_default_ns1__executeCommand(soap, p); { ::soap_default_ns1__executeCommand(soap, p);
if (soap_begin_recv(soap) || soap_get_ns1__executeCommand(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_ns1__executeCommand(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -732,16 +794,16 @@ inline int soap_read_ns1__executeCommand(struct soap *soap, struct ns1__executeC
inline int soap_GET_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand *p) inline int soap_GET_ns1__executeCommand(struct soap *soap, const char *URL, struct ns1__executeCommand *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_ns1__executeCommand(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_ns1__executeCommand(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p) inline int soap_POST_recv_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p)
{ {
if (soap_read_ns1__executeCommand(soap, p) || soap_closesock(soap)) if (::soap_read_ns1__executeCommand(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -761,9 +823,9 @@ inline struct ns1__executeCommandResponse * soap_new_ns1__executeCommandResponse
inline struct ns1__executeCommandResponse * soap_new_req_ns1__executeCommandResponse( inline struct ns1__executeCommandResponse * soap_new_req_ns1__executeCommandResponse(
struct soap *soap) struct soap *soap)
{ {
struct ns1__executeCommandResponse *_p = soap_new_ns1__executeCommandResponse(soap); struct ns1__executeCommandResponse *_p = ::soap_new_ns1__executeCommandResponse(soap);
if (_p) if (_p)
{ soap_default_ns1__executeCommandResponse(soap, _p); { ::soap_default_ns1__executeCommandResponse(soap, _p);
} }
return _p; return _p;
} }
@@ -772,9 +834,9 @@ inline struct ns1__executeCommandResponse * soap_new_set_ns1__executeCommandResp
struct soap *soap, struct soap *soap,
char **result) char **result)
{ {
struct ns1__executeCommandResponse *_p = soap_new_ns1__executeCommandResponse(soap); struct ns1__executeCommandResponse *_p = ::soap_new_ns1__executeCommandResponse(soap);
if (_p) if (_p)
{ soap_default_ns1__executeCommandResponse(soap, _p); { ::soap_default_ns1__executeCommandResponse(soap, _p);
_p->result = result; _p->result = result;
} }
return _p; return _p;
@@ -784,7 +846,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommandResponse(struct soap*, con
inline int soap_write_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse const*p) inline int soap_write_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_begin_send(soap) || (soap_serialize_ns1__executeCommandResponse(soap, p), 0) || soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap)) if (soap_begin_send(soap) || (::soap_serialize_ns1__executeCommandResponse(soap, p), 0) || ::soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap))
return soap->error; return soap->error;
return SOAP_OK; return SOAP_OK;
} }
@@ -792,16 +854,24 @@ inline int soap_write_ns1__executeCommandResponse(struct soap *soap, struct ns1_
inline int soap_PUT_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse const*p) inline int soap_PUT_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || (soap_serialize_ns1__executeCommandResponse(soap, p), 0) || soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommandResponse(soap, p), 0) || ::soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommandResponse(soap, p), 0) || ::soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse const*p) inline int soap_POST_send_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || (soap_serialize_ns1__executeCommandResponse(soap, p), 0) || soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || (::soap_serialize_ns1__executeCommandResponse(soap, p), 0) || ::soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__executeCommandResponse(struct soap*, struct ns1__executeCommandResponse *, const char*, const char*); SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__executeCommandResponse(struct soap*, struct ns1__executeCommandResponse *, const char*, const char*);
@@ -809,8 +879,8 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__execute
inline int soap_read_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p) inline int soap_read_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p)
{ {
if (p) if (p)
{ soap_default_ns1__executeCommandResponse(soap, p); { ::soap_default_ns1__executeCommandResponse(soap, p);
if (soap_begin_recv(soap) || soap_get_ns1__executeCommandResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) if (soap_begin_recv(soap) || ::soap_get_ns1__executeCommandResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -818,16 +888,16 @@ inline int soap_read_ns1__executeCommandResponse(struct soap *soap, struct ns1__
inline int soap_GET_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse *p) inline int soap_GET_ns1__executeCommandResponse(struct soap *soap, const char *URL, struct ns1__executeCommandResponse *p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_ns1__executeCommandResponse(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_ns1__executeCommandResponse(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p) inline int soap_POST_recv_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p)
{ {
if (soap_read_ns1__executeCommandResponse(soap, p) || soap_closesock(soap)) if (::soap_read_ns1__executeCommandResponse(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -910,7 +980,7 @@ inline int soap_write__QName(struct soap *soap, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (p) if (p)
{ if (soap_begin_send(soap) || soap_put__QName(soap, p, "QName", "") || soap_end_send(soap)) { if (soap_begin_send(soap) || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -919,16 +989,24 @@ inline int soap_write__QName(struct soap *soap, char *const*p)
inline int soap_PUT__QName(struct soap *soap, const char *URL, char *const*p) inline int soap_PUT__QName(struct soap *soap, const char *URL, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || soap_put__QName(soap, p, "QName", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH__QName(struct soap *soap, const char *URL, char *const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send__QName(struct soap *soap, const char *URL, char *const*p) inline int soap_POST_send__QName(struct soap *soap, const char *URL, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || soap_put__QName(soap, p, "QName", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put__QName(soap, p, "QName", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*); SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*);
@@ -936,7 +1014,7 @@ SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*
inline int soap_read__QName(struct soap *soap, char **p) inline int soap_read__QName(struct soap *soap, char **p)
{ {
if (p) if (p)
{ if (soap_begin_recv(soap) || soap_get__QName(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) { if (soap_begin_recv(soap) || ::soap_get__QName(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -944,16 +1022,16 @@ inline int soap_read__QName(struct soap *soap, char **p)
inline int soap_GET__QName(struct soap *soap, const char *URL, char **p) inline int soap_GET__QName(struct soap *soap, const char *URL, char **p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read__QName(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read__QName(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv__QName(struct soap *soap, char **p) inline int soap_POST_recv__QName(struct soap *soap, char **p)
{ {
if (soap_read__QName(soap, p) || soap_closesock(soap)) if (::soap_read__QName(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
@@ -988,7 +1066,7 @@ inline int soap_write_string(struct soap *soap, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (p) if (p)
{ if (soap_begin_send(soap) || soap_put_string(soap, p, "string", "") || soap_end_send(soap)) { if (soap_begin_send(soap) || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -997,16 +1075,24 @@ inline int soap_write_string(struct soap *soap, char *const*p)
inline int soap_PUT_string(struct soap *soap, const char *URL, char *const*p) inline int soap_PUT_string(struct soap *soap, const char *URL, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_PUT(soap, URL, NULL, NULL) || soap_put_string(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap)) if (soap_PUT(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK;
}
inline int soap_PATCH_string(struct soap *soap, const char *URL, char *const*p)
{
soap_free_temp(soap);
if (soap_PATCH(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap) || soap_recv_empty_response(soap))
return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
inline int soap_POST_send_string(struct soap *soap, const char *URL, char *const*p) inline int soap_POST_send_string(struct soap *soap, const char *URL, char *const*p)
{ {
soap_free_temp(soap); soap_free_temp(soap);
if (soap_connect(soap, URL, NULL) || soap_put_string(soap, p, "string", "") || soap_end_send(soap)) if (soap_POST(soap, URL, NULL, "text/xml; charset=utf-8") || ::soap_put_string(soap, p, "string", "") || soap_end_send(soap))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return SOAP_OK;
} }
SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*); SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*);
@@ -1014,7 +1100,7 @@ SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*
inline int soap_read_string(struct soap *soap, char **p) inline int soap_read_string(struct soap *soap, char **p)
{ {
if (p) if (p)
{ if (soap_begin_recv(soap) || soap_get_string(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) { if (soap_begin_recv(soap) || ::soap_get_string(soap, p, NULL, NULL) == NULL || soap_end_recv(soap))
return soap->error; return soap->error;
} }
return SOAP_OK; return SOAP_OK;
@@ -1022,16 +1108,16 @@ inline int soap_read_string(struct soap *soap, char **p)
inline int soap_GET_string(struct soap *soap, const char *URL, char **p) inline int soap_GET_string(struct soap *soap, const char *URL, char **p)
{ {
if (soap_GET(soap, URL, NULL) || soap_read_string(soap, p)) if (soap_GET(soap, URL, NULL) || ::soap_read_string(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
inline int soap_POST_recv_string(struct soap *soap, char **p) inline int soap_POST_recv_string(struct soap *soap, char **p)
{ {
if (soap_read_string(soap, p) || soap_closesock(soap)) if (::soap_read_string(soap, p))
return soap->error; return soap_closesock(soap);
return SOAP_OK; return soap_closesock(soap);
} }
#endif #endif
+6 -6
View File
@@ -1,8 +1,8 @@
/* soapServer.cpp /* soapServer.cpp
Generated by gSOAP 2.8.49 for gsoap.stub Generated by gSOAP 2.8.117 for gsoap.stub
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2000-2017, Robert van Engelen, Genivia Inc. All Rights Reserved. Copyright (C) 2000-2021, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL. The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed. compiling, linking, and/or using OpenSSL is allowed.
@@ -17,7 +17,7 @@ A commercial use license is available from Genivia Inc., [email protected]
#endif #endif
#include "soapH.h" #include "soapH.h"
SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.8.49 2017-07-19 15:45:31 GMT") SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.8.117 2021-12-21 00:03:56 GMT")
extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap) extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
{ {
#ifndef WITH_FASTCGI #ifndef WITH_FASTCGI
@@ -55,7 +55,7 @@ extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
#ifndef WITH_NOSERVEREQUEST #ifndef WITH_NOSERVEREQUEST
extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap) extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
{ {
soap_peek_element(soap); (void)soap_peek_element(soap);
if (!soap_match_tag(soap, soap->tag, "ns1:executeCommand")) if (!soap_match_tag(soap, soap->tag, "ns1:executeCommand"))
return soap_serve_ns1__executeCommand(soap); return soap_serve_ns1__executeCommand(soap);
return soap->error = SOAP_NO_METHOD; return soap->error = SOAP_NO_METHOD;
@@ -79,12 +79,12 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns1__executeCommand(struct soap *soap)
soap->error = ns1__executeCommand(soap, soap_tmp_ns1__executeCommand.command, soap_tmp_ns1__executeCommandResponse.result); soap->error = ns1__executeCommand(soap, soap_tmp_ns1__executeCommand.command, soap_tmp_ns1__executeCommandResponse.result);
if (soap->error) if (soap->error)
return soap->error; return soap->error;
soap->encodingStyle = NULL; soap->encodingStyle = NULL; /* use SOAP literal style */
soap_serializeheader(soap); soap_serializeheader(soap);
soap_serialize_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse); soap_serialize_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse);
if (soap_begin_count(soap)) if (soap_begin_count(soap))
return soap->error; return soap->error;
if (soap->mode & SOAP_IO_LENGTH) if ((soap->mode & SOAP_IO_LENGTH))
{ if (soap_envelope_begin_out(soap) { if (soap_envelope_begin_out(soap)
|| soap_putheader(soap) || soap_putheader(soap)
|| soap_body_begin_out(soap) || soap_body_begin_out(soap)
+39 -46
View File
@@ -1,8 +1,8 @@
/* soapStub.h /* soapStub.h
Generated by gSOAP 2.8.49 for gsoap.stub Generated by gSOAP 2.8.117 for gsoap.stub
gSOAP XML Web services tools gSOAP XML Web services tools
Copyright (C) 2000-2017, Robert van Engelen, Genivia Inc. All Rights Reserved. Copyright (C) 2000-2021, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL. The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed. compiling, linking, and/or using OpenSSL is allowed.
@@ -15,8 +15,8 @@ A commercial use license is available from Genivia Inc., [email protected]
#ifndef soapStub_H #ifndef soapStub_H
#define soapStub_H #define soapStub_H
#include "stdsoap2.h" #include "stdsoap2.h"
#if GSOAP_VERSION != 20849 #if GSOAP_VERSION != 208117
# error "GSOAP VERSION 20849 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE" # error "GSOAP VERSION 208117 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE"
#endif #endif
@@ -39,17 +39,16 @@ struct ns1__executeCommand; /* gsoap.stub:1 */
/* gsoap.stub:1 */ /* gsoap.stub:1 */
#ifndef SOAP_TYPE_ns1__executeCommandResponse #ifndef SOAP_TYPE_ns1__executeCommandResponse
#define SOAP_TYPE_ns1__executeCommandResponse (9) #define SOAP_TYPE_ns1__executeCommandResponse (9)
/* complex XSD type 'ns1:executeCommandResponse': */ /* complex XML schema type 'ns1:executeCommandResponse': */
struct SOAP_CMAC ns1__executeCommandResponse { struct SOAP_CMAC ns1__executeCommandResponse {
public: public:
/** Optional element 'result' of XSD type 'xsd:string' */ /** Optional element 'result' of XML schema type 'xsd:string' */
char **result; char **result;
public: public:
/** Return unique type id SOAP_TYPE_ns1__executeCommandResponse */ /** Return unique type id SOAP_TYPE_ns1__executeCommandResponse */
int soap_type() const { return SOAP_TYPE_ns1__executeCommandResponse; } long soap_type() const { return SOAP_TYPE_ns1__executeCommandResponse; }
/** Constructor with member initializations */ /** Constructor with member initializations */
ns1__executeCommandResponse() : result() ns1__executeCommandResponse() : result() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -58,17 +57,16 @@ struct SOAP_CMAC ns1__executeCommandResponse {
/* gsoap.stub:1 */ /* gsoap.stub:1 */
#ifndef SOAP_TYPE_ns1__executeCommand #ifndef SOAP_TYPE_ns1__executeCommand
#define SOAP_TYPE_ns1__executeCommand (10) #define SOAP_TYPE_ns1__executeCommand (10)
/* complex XSD type 'ns1:executeCommand': */ /* complex XML schema type 'ns1:executeCommand': */
struct SOAP_CMAC ns1__executeCommand { struct SOAP_CMAC ns1__executeCommand {
public: public:
/** Optional element 'command' of XSD type 'xsd:string' */ /** Optional element 'command' of XML schema type 'xsd:string' */
char *command; char *command;
public: public:
/** Return unique type id SOAP_TYPE_ns1__executeCommand */ /** Return unique type id SOAP_TYPE_ns1__executeCommand */
int soap_type() const { return SOAP_TYPE_ns1__executeCommand; } long soap_type() const { return SOAP_TYPE_ns1__executeCommand; }
/** Constructor with member initializations */ /** Constructor with member initializations */
ns1__executeCommand() : command() ns1__executeCommand() : command() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -82,10 +80,9 @@ struct SOAP_CMAC ns1__executeCommand {
struct SOAP_CMAC SOAP_ENV__Header { struct SOAP_CMAC SOAP_ENV__Header {
public: public:
/** Return unique type id SOAP_TYPE_SOAP_ENV__Header */ /** Return unique type id SOAP_TYPE_SOAP_ENV__Header */
int soap_type() const { return SOAP_TYPE_SOAP_ENV__Header; } long soap_type() const { return SOAP_TYPE_SOAP_ENV__Header; }
/** Constructor with member initializations */ /** Constructor with member initializations */
SOAP_ENV__Header() SOAP_ENV__Header() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -100,16 +97,15 @@ struct SOAP_CMAC SOAP_ENV__Header {
/* SOAP_ENV__Code: */ /* SOAP_ENV__Code: */
struct SOAP_CMAC SOAP_ENV__Code { struct SOAP_CMAC SOAP_ENV__Code {
public: public:
/** Optional element 'SOAP-ENV:Value' of XSD type 'xsd:QName' */ /** Optional element 'SOAP-ENV:Value' of XML schema type 'xsd:QName' */
char *SOAP_ENV__Value; char *SOAP_ENV__Value;
/** Optional element 'SOAP-ENV:Subcode' of XSD type 'SOAP-ENV:Code' */ /** Optional element 'SOAP-ENV:Subcode' of XML schema type 'SOAP-ENV:Code' */
struct SOAP_ENV__Code *SOAP_ENV__Subcode; struct SOAP_ENV__Code *SOAP_ENV__Subcode;
public: public:
/** Return unique type id SOAP_TYPE_SOAP_ENV__Code */ /** Return unique type id SOAP_TYPE_SOAP_ENV__Code */
int soap_type() const { return SOAP_TYPE_SOAP_ENV__Code; } long soap_type() const { return SOAP_TYPE_SOAP_ENV__Code; }
/** Constructor with member initializations */ /** Constructor with member initializations */
SOAP_ENV__Code() : SOAP_ENV__Value(), SOAP_ENV__Subcode() SOAP_ENV__Code() : SOAP_ENV__Value(), SOAP_ENV__Subcode() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -124,16 +120,15 @@ struct SOAP_CMAC SOAP_ENV__Code {
struct SOAP_CMAC SOAP_ENV__Detail { struct SOAP_CMAC SOAP_ENV__Detail {
public: public:
char *__any; char *__any;
/** Any type of element 'fault' assigned to fault with its SOAP_TYPE_T assigned to __type */ /** Any type of element 'fault' assigned to fault with its SOAP_TYPE_<typename> assigned to __type */
/** Do not create a cyclic data structure throught this member unless SOAP encoding or SOAP_XML_GRAPH are used for id-ref serialization */ /** Do not create a cyclic data structure through this member unless SOAP encoding or SOAP_XML_GRAPH are used for id-ref serialization */
int __type; int __type;
void *fault; void *fault;
public: public:
/** Return unique type id SOAP_TYPE_SOAP_ENV__Detail */ /** Return unique type id SOAP_TYPE_SOAP_ENV__Detail */
int soap_type() const { return SOAP_TYPE_SOAP_ENV__Detail; } long soap_type() const { return SOAP_TYPE_SOAP_ENV__Detail; }
/** Constructor with member initializations */ /** Constructor with member initializations */
SOAP_ENV__Detail() : __any(), __type(), fault() SOAP_ENV__Detail() : __any(), __type(), fault() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -147,14 +142,13 @@ struct SOAP_CMAC SOAP_ENV__Detail {
/* SOAP_ENV__Reason: */ /* SOAP_ENV__Reason: */
struct SOAP_CMAC SOAP_ENV__Reason { struct SOAP_CMAC SOAP_ENV__Reason {
public: public:
/** Optional element 'SOAP-ENV:Text' of XSD type 'xsd:string' */ /** Optional element 'SOAP-ENV:Text' of XML schema type 'xsd:string' */
char *SOAP_ENV__Text; char *SOAP_ENV__Text;
public: public:
/** Return unique type id SOAP_TYPE_SOAP_ENV__Reason */ /** Return unique type id SOAP_TYPE_SOAP_ENV__Reason */
int soap_type() const { return SOAP_TYPE_SOAP_ENV__Reason; } long soap_type() const { return SOAP_TYPE_SOAP_ENV__Reason; }
/** Constructor with member initializations */ /** Constructor with member initializations */
SOAP_ENV__Reason() : SOAP_ENV__Text() SOAP_ENV__Reason() : SOAP_ENV__Text() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -168,30 +162,29 @@ struct SOAP_CMAC SOAP_ENV__Reason {
/* SOAP_ENV__Fault: */ /* SOAP_ENV__Fault: */
struct SOAP_CMAC SOAP_ENV__Fault { struct SOAP_CMAC SOAP_ENV__Fault {
public: public:
/** Optional element 'faultcode' of XSD type 'xsd:QName' */ /** Optional element 'faultcode' of XML schema type 'xsd:QName' */
char *faultcode; char *faultcode;
/** Optional element 'faultstring' of XSD type 'xsd:string' */ /** Optional element 'faultstring' of XML schema type 'xsd:string' */
char *faultstring; char *faultstring;
/** Optional element 'faultactor' of XSD type 'xsd:string' */ /** Optional element 'faultactor' of XML schema type 'xsd:string' */
char *faultactor; char *faultactor;
/** Optional element 'detail' of XSD type 'SOAP-ENV:Detail' */ /** Optional element 'detail' of XML schema type 'SOAP-ENV:Detail' */
struct SOAP_ENV__Detail *detail; struct SOAP_ENV__Detail *detail;
/** Optional element 'SOAP-ENV:Code' of XSD type 'SOAP-ENV:Code' */ /** Optional element 'SOAP-ENV:Code' of XML schema type 'SOAP-ENV:Code' */
struct SOAP_ENV__Code *SOAP_ENV__Code; struct SOAP_ENV__Code *SOAP_ENV__Code;
/** Optional element 'SOAP-ENV:Reason' of XSD type 'SOAP-ENV:Reason' */ /** Optional element 'SOAP-ENV:Reason' of XML schema type 'SOAP-ENV:Reason' */
struct SOAP_ENV__Reason *SOAP_ENV__Reason; struct SOAP_ENV__Reason *SOAP_ENV__Reason;
/** Optional element 'SOAP-ENV:Node' of XSD type 'xsd:string' */ /** Optional element 'SOAP-ENV:Node' of XML schema type 'xsd:string' */
char *SOAP_ENV__Node; char *SOAP_ENV__Node;
/** Optional element 'SOAP-ENV:Role' of XSD type 'xsd:string' */ /** Optional element 'SOAP-ENV:Role' of XML schema type 'xsd:string' */
char *SOAP_ENV__Role; char *SOAP_ENV__Role;
/** Optional element 'SOAP-ENV:Detail' of XSD type 'SOAP-ENV:Detail' */ /** Optional element 'SOAP-ENV:Detail' of XML schema type 'SOAP-ENV:Detail' */
struct SOAP_ENV__Detail *SOAP_ENV__Detail; struct SOAP_ENV__Detail *SOAP_ENV__Detail;
public: public:
/** Return unique type id SOAP_TYPE_SOAP_ENV__Fault */ /** Return unique type id SOAP_TYPE_SOAP_ENV__Fault */
int soap_type() const { return SOAP_TYPE_SOAP_ENV__Fault; } long soap_type() const { return SOAP_TYPE_SOAP_ENV__Fault; }
/** Constructor with member initializations */ /** Constructor with member initializations */
SOAP_ENV__Fault() : faultcode(), faultstring(), faultactor(), detail(), SOAP_ENV__Code(), SOAP_ENV__Reason(), SOAP_ENV__Node(), SOAP_ENV__Role(), SOAP_ENV__Detail() SOAP_ENV__Fault() : faultcode(), faultstring(), faultactor(), detail(), SOAP_ENV__Code(), SOAP_ENV__Reason(), SOAP_ENV__Node(), SOAP_ENV__Role(), SOAP_ENV__Detail() { }
{ }
/** Friend allocator */ /** Friend allocator */
friend SOAP_FMAC1 SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*); friend SOAP_FMAC1 SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*);
}; };
@@ -205,13 +198,13 @@ struct SOAP_CMAC SOAP_ENV__Fault {
\******************************************************************************/ \******************************************************************************/
/* gsoap.stub:1 */ /* (built-in):0 */
#ifndef SOAP_TYPE__XML #ifndef SOAP_TYPE__XML
#define SOAP_TYPE__XML (5) #define SOAP_TYPE__XML (5)
typedef char *_XML; typedef char *_XML;
#endif #endif
/* gsoap.stub:1 */ /* (built-in):0 */
#ifndef SOAP_TYPE__QName #ifndef SOAP_TYPE__QName
#define SOAP_TYPE__QName (6) #define SOAP_TYPE__QName (6)
typedef char *_QName; typedef char *_QName;
@@ -317,7 +310,7 @@ typedef char *_QName;
* * * *
\******************************************************************************/ \******************************************************************************/
/** Web service operation 'ns1__executeCommand' (returns SOAP_OK or error code) */ /** Web service operation 'ns1__executeCommand' implementation, should return SOAP_OK or error code */
SOAP_FMAC5 int SOAP_FMAC6 ns1__executeCommand(struct soap*, char *command, char **result); SOAP_FMAC5 int SOAP_FMAC6 ns1__executeCommand(struct soap*, char *command, char **result);
/******************************************************************************\ /******************************************************************************\
+7522 -4504
View File
File diff suppressed because it is too large Load Diff
+854 -664
View File
File diff suppressed because it is too large Load Diff