317 lines
11 KiB
C++
317 lines
11 KiB
C++
/* soapServer.cpp
|
|
Generated by gSOAP 2.8.135 for ../onvif_head/onvif.h
|
|
|
|
gSOAP XML Web services tools
|
|
Copyright (C) 2000,2024, 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.
|
|
--------------------------------------------------------------------------------
|
|
A commercial use license is available from Genivia Inc., contact@genivia.com
|
|
--------------------------------------------------------------------------------
|
|
*/
|
|
|
|
#if defined(__BORLANDC__)
|
|
#pragma option push -w-8060
|
|
#pragma option push -w-8004
|
|
#endif
|
|
#include "soapH.h"
|
|
|
|
SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.8.135 2024-09-04 02:23:14 GMT")
|
|
extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
|
|
{
|
|
#ifndef WITH_FASTCGI
|
|
soap->keep_alive = soap->max_keep_alive + 1;
|
|
#endif
|
|
do
|
|
{
|
|
#ifndef WITH_FASTCGI
|
|
if (soap->keep_alive > 0 && soap->max_keep_alive > 0)
|
|
soap->keep_alive--;
|
|
#endif
|
|
if (soap_begin_serve(soap))
|
|
{ if (soap->error >= SOAP_STOP)
|
|
continue;
|
|
return soap->error;
|
|
}
|
|
if ((soap_serve_request(soap) || (soap->fserveloop && soap->fserveloop(soap))) && soap->error && soap->error < SOAP_STOP)
|
|
{
|
|
#ifdef WITH_FASTCGI
|
|
soap_send_fault(soap);
|
|
#else
|
|
return soap_send_fault(soap);
|
|
#endif
|
|
}
|
|
#ifdef WITH_FASTCGI
|
|
soap_destroy(soap);
|
|
soap_end(soap);
|
|
} while (1);
|
|
#else
|
|
} while (soap->keep_alive);
|
|
#endif
|
|
return SOAP_OK;
|
|
}
|
|
|
|
#ifndef WITH_NOSERVEREQUEST
|
|
extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
|
|
{
|
|
(void)soap_peek_element(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "SOAP-ENV:Fault"))
|
|
return soap_serve_SOAP_ENV__Fault(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:Hello"))
|
|
return soap_serve___wsdd__Hello(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:Bye"))
|
|
return soap_serve___wsdd__Bye(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:Probe"))
|
|
return soap_serve___wsdd__Probe(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:ProbeMatches"))
|
|
return soap_serve___wsdd__ProbeMatches(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:Resolve"))
|
|
return soap_serve___wsdd__Resolve(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "wsdd:ResolveMatches"))
|
|
return soap_serve___wsdd__ResolveMatches(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "tdn:Hello"))
|
|
return soap_serve___tdn__Hello(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "tdn:Bye"))
|
|
return soap_serve___tdn__Bye(soap);
|
|
if (!soap_match_tag(soap, soap->tag, "tdn:Probe"))
|
|
return soap_serve___tdn__Probe(soap);
|
|
return soap->error = SOAP_NO_METHOD;
|
|
}
|
|
#endif
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve_SOAP_ENV__Fault(struct soap *soap)
|
|
{ struct SOAP_ENV__Fault soap_tmp_SOAP_ENV__Fault;
|
|
soap_default_SOAP_ENV__Fault(soap, &soap_tmp_SOAP_ENV__Fault);
|
|
if (!soap_get_SOAP_ENV__Fault(soap, &soap_tmp_SOAP_ENV__Fault, "SOAP-ENV:Fault", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = SOAP_ENV__Fault(soap, soap_tmp_SOAP_ENV__Fault.faultcode, soap_tmp_SOAP_ENV__Fault.faultstring, soap_tmp_SOAP_ENV__Fault.faultactor, soap_tmp_SOAP_ENV__Fault.detail, soap_tmp_SOAP_ENV__Fault.SOAP_ENV__Code, soap_tmp_SOAP_ENV__Fault.SOAP_ENV__Reason, soap_tmp_SOAP_ENV__Fault.SOAP_ENV__Node, soap_tmp_SOAP_ENV__Fault.SOAP_ENV__Role, soap_tmp_SOAP_ENV__Fault.SOAP_ENV__Detail);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__Hello(struct soap *soap)
|
|
{ struct __wsdd__Hello soap_tmp___wsdd__Hello;
|
|
soap_default___wsdd__Hello(soap, &soap_tmp___wsdd__Hello);
|
|
if (!soap_get___wsdd__Hello(soap, &soap_tmp___wsdd__Hello, "-wsdd:Hello", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__Hello(soap, soap_tmp___wsdd__Hello.wsdd__Hello);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__Bye(struct soap *soap)
|
|
{ struct __wsdd__Bye soap_tmp___wsdd__Bye;
|
|
soap_default___wsdd__Bye(soap, &soap_tmp___wsdd__Bye);
|
|
if (!soap_get___wsdd__Bye(soap, &soap_tmp___wsdd__Bye, "-wsdd:Bye", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__Bye(soap, soap_tmp___wsdd__Bye.wsdd__Bye);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__Probe(struct soap *soap)
|
|
{ struct __wsdd__Probe soap_tmp___wsdd__Probe;
|
|
soap_default___wsdd__Probe(soap, &soap_tmp___wsdd__Probe);
|
|
if (!soap_get___wsdd__Probe(soap, &soap_tmp___wsdd__Probe, "-wsdd:Probe", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__Probe(soap, soap_tmp___wsdd__Probe.wsdd__Probe);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__ProbeMatches(struct soap *soap)
|
|
{ struct __wsdd__ProbeMatches soap_tmp___wsdd__ProbeMatches;
|
|
soap_default___wsdd__ProbeMatches(soap, &soap_tmp___wsdd__ProbeMatches);
|
|
if (!soap_get___wsdd__ProbeMatches(soap, &soap_tmp___wsdd__ProbeMatches, "-wsdd:ProbeMatches", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__ProbeMatches(soap, soap_tmp___wsdd__ProbeMatches.wsdd__ProbeMatches);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__Resolve(struct soap *soap)
|
|
{ struct __wsdd__Resolve soap_tmp___wsdd__Resolve;
|
|
soap_default___wsdd__Resolve(soap, &soap_tmp___wsdd__Resolve);
|
|
if (!soap_get___wsdd__Resolve(soap, &soap_tmp___wsdd__Resolve, "-wsdd:Resolve", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__Resolve(soap, soap_tmp___wsdd__Resolve.wsdd__Resolve);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___wsdd__ResolveMatches(struct soap *soap)
|
|
{ struct __wsdd__ResolveMatches soap_tmp___wsdd__ResolveMatches;
|
|
soap_default___wsdd__ResolveMatches(soap, &soap_tmp___wsdd__ResolveMatches);
|
|
if (!soap_get___wsdd__ResolveMatches(soap, &soap_tmp___wsdd__ResolveMatches, "-wsdd:ResolveMatches", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __wsdd__ResolveMatches(soap, soap_tmp___wsdd__ResolveMatches.wsdd__ResolveMatches);
|
|
if (soap->error)
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___tdn__Hello(struct soap *soap)
|
|
{ struct __tdn__Hello soap_tmp___tdn__Hello;
|
|
struct wsdd__ResolveType tdn__HelloResponse;
|
|
soap_default_wsdd__ResolveType(soap, &tdn__HelloResponse);
|
|
soap_default___tdn__Hello(soap, &soap_tmp___tdn__Hello);
|
|
if (!soap_get___tdn__Hello(soap, &soap_tmp___tdn__Hello, "-tdn:Hello", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __tdn__Hello(soap, soap_tmp___tdn__Hello.tdn__Hello, tdn__HelloResponse);
|
|
if (soap->error)
|
|
return soap->error;
|
|
soap->encodingStyle = NULL; /* use SOAP literal style */
|
|
soap_serializeheader(soap);
|
|
soap_serialize_wsdd__ResolveType(soap, &tdn__HelloResponse);
|
|
if (soap_begin_count(soap))
|
|
return soap->error;
|
|
if ((soap->mode & SOAP_IO_LENGTH))
|
|
{ if (soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ResolveType(soap, &tdn__HelloResponse, "tdn:HelloResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap))
|
|
return soap->error;
|
|
};
|
|
if (soap_end_count(soap)
|
|
|| soap_response(soap, SOAP_OK)
|
|
|| soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ResolveType(soap, &tdn__HelloResponse, "tdn:HelloResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap)
|
|
|| soap_end_send(soap))
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___tdn__Bye(struct soap *soap)
|
|
{ struct __tdn__Bye soap_tmp___tdn__Bye;
|
|
struct wsdd__ResolveType tdn__ByeResponse;
|
|
soap_default_wsdd__ResolveType(soap, &tdn__ByeResponse);
|
|
soap_default___tdn__Bye(soap, &soap_tmp___tdn__Bye);
|
|
if (!soap_get___tdn__Bye(soap, &soap_tmp___tdn__Bye, "-tdn:Bye", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __tdn__Bye(soap, soap_tmp___tdn__Bye.tdn__Bye, tdn__ByeResponse);
|
|
if (soap->error)
|
|
return soap->error;
|
|
soap->encodingStyle = NULL; /* use SOAP literal style */
|
|
soap_serializeheader(soap);
|
|
soap_serialize_wsdd__ResolveType(soap, &tdn__ByeResponse);
|
|
if (soap_begin_count(soap))
|
|
return soap->error;
|
|
if ((soap->mode & SOAP_IO_LENGTH))
|
|
{ if (soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ResolveType(soap, &tdn__ByeResponse, "tdn:ByeResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap))
|
|
return soap->error;
|
|
};
|
|
if (soap_end_count(soap)
|
|
|| soap_response(soap, SOAP_OK)
|
|
|| soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ResolveType(soap, &tdn__ByeResponse, "tdn:ByeResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap)
|
|
|| soap_end_send(soap))
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___tdn__Probe(struct soap *soap)
|
|
{ struct __tdn__Probe soap_tmp___tdn__Probe;
|
|
struct wsdd__ProbeMatchesType tdn__ProbeResponse;
|
|
soap_default_wsdd__ProbeMatchesType(soap, &tdn__ProbeResponse);
|
|
soap_default___tdn__Probe(soap, &soap_tmp___tdn__Probe);
|
|
if (!soap_get___tdn__Probe(soap, &soap_tmp___tdn__Probe, "-tdn:Probe", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = __tdn__Probe(soap, soap_tmp___tdn__Probe.tdn__Probe, tdn__ProbeResponse);
|
|
if (soap->error)
|
|
return soap->error;
|
|
soap->encodingStyle = NULL; /* use SOAP literal style */
|
|
soap_serializeheader(soap);
|
|
soap_serialize_wsdd__ProbeMatchesType(soap, &tdn__ProbeResponse);
|
|
if (soap_begin_count(soap))
|
|
return soap->error;
|
|
if ((soap->mode & SOAP_IO_LENGTH))
|
|
{ if (soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ProbeMatchesType(soap, &tdn__ProbeResponse, "tdn:ProbeResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap))
|
|
return soap->error;
|
|
};
|
|
if (soap_end_count(soap)
|
|
|| soap_response(soap, SOAP_OK)
|
|
|| soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put_wsdd__ProbeMatchesType(soap, &tdn__ProbeResponse, "tdn:ProbeResponse", "")
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap)
|
|
|| soap_end_send(soap))
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
#if defined(__BORLANDC__)
|
|
#pragma option pop
|
|
#pragma option pop
|
|
#endif
|
|
|
|
/* End of soapServer.cpp */
|