Modifying SOAP interface¶
NOTE: this page is deprecated, as of version 1.4.0 the soap interface files are automatically generated through the build process.
The SOAP interface is defined by webservices/model_soap.h. From this header-file several other files are generated (everything except model_soap.*). After modifying model_soap.h these files have to be regenerated by issuing:
soapcpp2 -SLx model_soap.h
or on Ubuntu:
soapcpp2 -I/usr/include/gsoap/ -SLx model_soap.h
on Mac OS X:
soapcpp2 -I /opt/local/share/gsoap/import/ -SLx model_soap.h
After regenerating those file you need to apply the following patch:
--- ./webservices/soapdssObject.h.gen 2011-10-13 13:34:06.985806729 +0200
+++ ./webservices/soapdssObject.h 2011-10-14 10:13:19.502578656 +0200
@@ -9,6 +9,9 @@
#define soapdssObject_H
#include "soapH.h"
+// soap_accept() timeout in seconds
+#define SOAP_ACCEPT_TIMEOUT 2
+
/******************************************************************************\
* *
* Service Object *
@@ -27,6 +30,8 @@
{"dss", "urn:dss:1.0", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
+ bind_flags = SO_REUSEADDR;
+ accept_timeout = SOAP_ACCEPT_TIMEOUT; // seconds
if (!this->namespaces) this->namespaces = namespaces; };
virtual ~dssService() { };
/// Bind service to port (returns master socket or SOAP_INVALID_SOCKET)
Note, that as of version 0.7.7 the SOAP interface is using SSL, more information regarding the SSL setup is available here.