diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-07-19 12:51:28 -0300 |
---|---|---|
committer | Aokromes <aokromes@gmail.com> | 2017-07-20 11:26:26 +0200 |
commit | f7e7aef8fcd057d3f23a83da8bec48abaf36779e (patch) | |
tree | ab216ac10d5383bd7a6687982d1e89ca87cb1e19 /dep/gsoap/soapC.cpp | |
parent | a9174d5eb75b4e0f28542c44b797fcacddc7ab64 (diff) |
Dep/gSOAP: Update gSOAP to 2.8.49
Closes #20039
Diffstat (limited to 'dep/gsoap/soapC.cpp')
-rw-r--r-- | dep/gsoap/soapC.cpp | 217 |
1 files changed, 120 insertions, 97 deletions
diff --git a/dep/gsoap/soapC.cpp b/dep/gsoap/soapC.cpp index cc332c4854b..f58d2854c7d 100644 --- a/dep/gsoap/soapC.cpp +++ b/dep/gsoap/soapC.cpp @@ -1,8 +1,8 @@ /* soapC.cpp - Generated by gSOAP 2.8.33 for gsoap.stub + Generated by gSOAP 2.8.49 for gsoap.stub gSOAP XML Web services tools -Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved. +Copyright (C) 2000-2017, Robert van Engelen, Genivia Inc. All Rights Reserved. The soapcpp2 tool and its generated software are released under the GPL. This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. @@ -18,7 +18,7 @@ A commercial use license is available from Genivia Inc., contact@genivia.com #include "soapH.h" -SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.33 2016-07-29 05:51:35 GMT") +SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.49 2017-07-19 15:45:31 GMT") #ifndef WITH_NOGLOBAL @@ -362,6 +362,29 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, #endif #endif +#ifdef __cplusplus +extern "C" { +#endif + +SOAP_FMAC3 void * SOAP_FMAC4 soap_dupelement(struct soap *soap, const void *ptr, int type) +{(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */ + return NULL; +} +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +SOAP_FMAC3 void SOAP_FMAC4 soap_delelement(const void *ptr, int type) +{(void)ptr; (void)type; /* appease -Wall -Werror */ +} +#ifdef __cplusplus +} +#endif + SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap *soap, int t, const char *type, const char *arrayType, size_t *n) { (void)type; switch (t) @@ -533,16 +556,6 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap *soap, int t, int tt, void * #endif #endif -SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap *soap, char *a) -{ - (void)soap; /* appease -Wall -Werror */ -#ifdef SOAP_DEFAULT_byte - *a = SOAP_DEFAULT_byte; -#else - *a = (char)0; -#endif -} - SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type) { return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte); @@ -554,9 +567,17 @@ SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap *soap, const char *tag, ch return a; } +SOAP_FMAC3 char * SOAP_FMAC4 soap_new_byte(struct soap *soap, int n) +{ + char *a = static_cast<char *>(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(char))); + for (char *p = a; p && n--; ++p) + soap_default_byte(soap, p); + return a; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap *soap, const char *a, const char *tag, const char *type) { - if (soap_out_byte(soap, tag?tag:"byte", -2, a, type)) + if (soap_out_byte(soap, tag ? tag : "byte", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -569,16 +590,6 @@ SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap *soap, char *p, const cha return p; } -SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap *soap, int *a) -{ - (void)soap; /* appease -Wall -Werror */ -#ifdef SOAP_DEFAULT_int - *a = SOAP_DEFAULT_int; -#else - *a = (int)0; -#endif -} - SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type) { return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int); @@ -590,9 +601,17 @@ SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap *soap, const char *tag, int return a; } +SOAP_FMAC3 int * SOAP_FMAC4 soap_new_int(struct soap *soap, int n) +{ + int *a = static_cast<int *>(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(int))); + for (int *p = a; p && n--; ++p) + soap_default_int(soap, p); + return a; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap *soap, const int *a, const char *tag, const char *type) { - if (soap_out_int(soap, tag?tag:"int", -2, a, type)) + if (soap_out_int(soap, tag ? tag : "int", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -681,55 +700,64 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so if (!a) return NULL; soap_default_SOAP_ENV__Fault(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in__QName(soap, "faultcode", (char**)&a->faultcode, "xsd:QName")) + { if (soap_in__QName(soap, "faultcode", (char**)&a->faultcode, "xsd:QName")) { soap_flag_faultcode--; continue; } + } if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "faultstring", (char**)&a->faultstring, "xsd:string")) + { if (soap_in_string(soap, "faultstring", (char**)&a->faultstring, "xsd:string")) { soap_flag_faultstring--; continue; } + } if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "faultactor", (char**)&a->faultactor, "xsd:string")) + { if (soap_in_string(soap, "faultactor", (char**)&a->faultactor, "xsd:string")) { soap_flag_faultactor--; continue; } + } if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, "")) + { if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, "")) { soap_flag_detail--; continue; } + } if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, "")) + { if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, "")) { soap_flag_SOAP_ENV__Code--; continue; } + } if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, "")) + { if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, "")) { soap_flag_SOAP_ENV__Reason--; continue; } + } if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Node", (char**)&a->SOAP_ENV__Node, "xsd:string")) + { if (soap_in_string(soap, "SOAP-ENV:Node", (char**)&a->SOAP_ENV__Node, "xsd:string")) { soap_flag_SOAP_ENV__Node--; continue; } + } if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Role", (char**)&a->SOAP_ENV__Role, "xsd:string")) + { if (soap_in_string(soap, "SOAP-ENV:Role", (char**)&a->SOAP_ENV__Role, "xsd:string")) { soap_flag_SOAP_ENV__Role--; continue; } + } if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, "")) + { if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, "")) { soap_flag_SOAP_ENV__Detail--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -750,7 +778,7 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct SOAP_ENV__Fault *p; size_t k = sizeof(struct SOAP_ENV__Fault); @@ -761,7 +789,7 @@ SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault( { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Fault, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Fault location=%p n=%d\n", 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) *size = k; @@ -770,7 +798,7 @@ SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault( SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type) { - if (soap_out_SOAP_ENV__Fault(soap, tag?tag:"SOAP-ENV:Fault", -2, a, type)) + if (soap_out_SOAP_ENV__Fault(soap, tag ? tag : "SOAP-ENV:Fault", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -822,15 +850,16 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct if (!a) return NULL; soap_default_SOAP_ENV__Reason(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Text", (char**)&a->SOAP_ENV__Text, "xsd:string")) + { if (soap_in_string(soap, "SOAP-ENV:Text", (char**)&a->SOAP_ENV__Text, "xsd:string")) { soap_flag_SOAP_ENV__Text--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -851,7 +880,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct SOAP_ENV__Reason *p; size_t k = sizeof(struct SOAP_ENV__Reason); @@ -862,7 +891,7 @@ SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reaso { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Reason, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Reason location=%p n=%d\n", 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) *size = k; @@ -871,7 +900,7 @@ SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reaso SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a, const char *tag, const char *type) { - if (soap_out_SOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", -2, a, type)) + if (soap_out_SOAP_ENV__Reason(soap, tag ? tag : "SOAP-ENV:Reason", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -925,20 +954,22 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct if (!a) return NULL; soap_default_SOAP_ENV__Detail(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { 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, &a->__type))) { soap_flag_fault = 0; continue; } + } if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_inliteral(soap, "-any", (char**)&a->__any)) + { if (soap_inliteral(soap, "-any", (char**)&a->__any)) { soap_flag___any--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -959,7 +990,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct SOAP_ENV__Detail *p; size_t k = sizeof(struct SOAP_ENV__Detail); @@ -970,7 +1001,7 @@ SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detai { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Detail, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Detail location=%p n=%d\n", 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) *size = k; @@ -979,7 +1010,7 @@ SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detai SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a, const char *tag, const char *type) { - if (soap_out_SOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", -2, a, type)) + if (soap_out_SOAP_ENV__Detail(soap, tag ? tag : "SOAP-ENV:Detail", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1035,20 +1066,22 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap if (!a) return NULL; soap_default_SOAP_ENV__Code(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in__QName(soap, "SOAP-ENV:Value", (char**)&a->SOAP_ENV__Value, "xsd:QName")) + { if (soap_in__QName(soap, "SOAP-ENV:Value", (char**)&a->SOAP_ENV__Value, "xsd:QName")) { soap_flag_SOAP_ENV__Value--; continue; } + } if (soap_flag_SOAP_ENV__Subcode && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, "")) + { if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, "")) { soap_flag_SOAP_ENV__Subcode--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -1069,7 +1102,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct SOAP_ENV__Code *p; size_t k = sizeof(struct SOAP_ENV__Code); @@ -1080,7 +1113,7 @@ SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(st { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Code, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Code location=%p n=%d\n", 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) *size = k; @@ -1089,7 +1122,7 @@ SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(st SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a, const char *tag, const char *type) { - if (soap_out_SOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", -2, a, type)) + if (soap_out_SOAP_ENV__Code(soap, tag ? tag : "SOAP-ENV:Code", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1134,7 +1167,7 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct if (!a) return NULL; soap_default_SOAP_ENV__Header(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; @@ -1158,7 +1191,7 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct SOAP_ENV__Header *p; size_t k = sizeof(struct SOAP_ENV__Header); @@ -1169,7 +1202,7 @@ SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Heade { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Header, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Header location=%p n=%d\n", 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) *size = k; @@ -1178,7 +1211,7 @@ SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Heade SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a, const char *tag, const char *type) { - if (soap_out_SOAP_ENV__Header(soap, tag?tag:"SOAP-ENV:Header", -2, a, type)) + if (soap_out_SOAP_ENV__Header(soap, tag ? tag : "SOAP-ENV:Header", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1226,15 +1259,16 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(s if (!a) return NULL; soap_default_ns1__executeCommand(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_command && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "command", (char**)&a->command, "xsd:string")) + { if (soap_in_string(soap, "command", (char**)&a->command, "xsd:string")) { soap_flag_command--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -1255,7 +1289,7 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(s SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommand(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommand(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct ns1__executeCommand *p; size_t k = sizeof(struct ns1__executeCommand); @@ -1266,7 +1300,7 @@ SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__execute { p = SOAP_NEW_ARRAY(struct ns1__executeCommand, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommand location=%p n=%d\n", 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) *size = k; @@ -1275,7 +1309,7 @@ SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__execute SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommand(struct soap *soap, const struct ns1__executeCommand *a, const char *tag, const char *type) { - if (soap_out_ns1__executeCommand(soap, tag?tag:"ns1:executeCommand", -2, a, type)) + if (soap_out_ns1__executeCommand(soap, tag ? tag : "ns1:executeCommand", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1321,15 +1355,16 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeC if (!a) return NULL; soap_default_ns1__executeCommandResponse(soap, a); - if (soap->body && !*soap->href) + if (soap->body && *soap->href != '#') { for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_result && soap->error == SOAP_TAG_MISMATCH) - if (soap_in_PointerTostring(soap, "result", &a->result, "xsd:string")) + { if (soap_in_PointerTostring(soap, "result", &a->result, "xsd:string")) { soap_flag_result--; continue; } + } if (soap->error == SOAP_TAG_MISMATCH) soap->error = soap_ignore_element(soap); if (soap->error == SOAP_NO_TAG) @@ -1350,7 +1385,7 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeC SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) { - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommandResponse(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommandResponse(%p, %d, %s, %s)\n", (void*)soap, n, type?type:"", arrayType?arrayType:"")); (void)type; (void)arrayType; /* appease -Wall -Werror */ struct ns1__executeCommandResponse *p; size_t k = sizeof(struct ns1__executeCommandResponse); @@ -1361,7 +1396,7 @@ SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1_ { p = SOAP_NEW_ARRAY(struct ns1__executeCommandResponse, n); k *= n; } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommandResponse location=%p n=%d\n", 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) *size = k; @@ -1370,7 +1405,7 @@ SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1_ SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommandResponse(struct soap *soap, const struct ns1__executeCommandResponse *a, const char *tag, const char *type) { - if (soap_out_ns1__executeCommandResponse(soap, tag?tag:"ns1:executeCommandResponse", -2, a, type)) + if (soap_out_ns1__executeCommandResponse(soap, tag ? tag : "ns1:executeCommandResponse", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1426,7 +1461,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reas SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type) { - if (soap_out_PointerToSOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", -2, a, type)) + if (soap_out_PointerToSOAP_ENV__Reason(soap, tag ? tag : "SOAP-ENV:Reason", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1484,7 +1519,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Deta SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type) { - if (soap_out_PointerToSOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", -2, a, type)) + if (soap_out_PointerToSOAP_ENV__Detail(soap, tag ? tag : "SOAP-ENV:Detail", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1545,7 +1580,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(s SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type) { - if (soap_out_PointerToSOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", -2, a, type)) + if (soap_out_PointerToSOAP_ENV__Code(soap, tag ? tag : "SOAP-ENV:Code", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1601,7 +1636,7 @@ SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerTostring(struct soap *soap, const SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTostring(struct soap *soap, char **const*a, const char *tag, const char *type) { - if (soap_out_PointerTostring(soap, tag?tag:"string", -2, a, type)) + if (soap_out_PointerTostring(soap, tag ? tag : "string", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1614,21 +1649,11 @@ SOAP_FMAC3 char *** SOAP_FMAC4 soap_get_PointerTostring(struct soap *soap, char return p; } -SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap *soap, char **a) -{ - (void)soap; /* appease -Wall -Werror */ -#ifdef SOAP_DEFAULT__QName - *a = SOAP_DEFAULT__QName; -#else - *a = (char *)0; -#endif -} - SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap *soap, char *const*a) { (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF - soap_reference(soap, *a, SOAP_TYPE__QName); + (void)soap_reference(soap, *a, SOAP_TYPE__QName); #endif } @@ -1645,7 +1670,7 @@ SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type) { - if (soap_out__QName(soap, tag?tag:"QName", -2, a, type)) + if (soap_out__QName(soap, tag ? tag : "QName", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1658,21 +1683,11 @@ SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap *soap, char **p, const return p; } -SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap *soap, char **a) -{ - (void)soap; /* appease -Wall -Werror */ -#ifdef SOAP_DEFAULT_string - *a = SOAP_DEFAULT_string; -#else - *a = (char *)0; -#endif -} - SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a) { (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF - soap_reference(soap, *a, SOAP_TYPE_string); + (void)soap_reference(soap, *a, SOAP_TYPE_string); #endif } @@ -1687,9 +1702,17 @@ SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag return a; } +SOAP_FMAC3 char * * SOAP_FMAC4 soap_new_string(struct soap *soap, int n) +{ + char * *a = static_cast<char * *>(soap_malloc(soap, (n = (n < 0 ? 1 : n)) * sizeof(char *))); + for (char * *p = a; p && n--; ++p) + soap_default_string(soap, p); + return a; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type) { - if (soap_out_string(soap, tag?tag:"string", -2, a, type)) + if (soap_out_string(soap, tag ? tag : "string", -2, a, type)) return soap->error; return soap_putindependent(soap); } |