// Implementation of SOAP Interface. This macro is required to be
// called to register the functions soap_init(), soap_serve(), and
// soap_end() to the SOAPHandlerFactory
REGISTER_SOAP_RESOURCE("trysoap", trysoap)
int ns__trySoap(struct soap * s, char * name, Response * rS)
{
rS->status = 1;
char tempStr[250];
strcpy(tempStr, "\"Hello ");
if(name == NULL || strlen(name) > 100)
return SOAP_CLI_FAULT;
strcat(tempStr, name);
strcat (tempStr, "\" says ns__trySoap");
rS->message = strdup(tempStr);
return SOAP_OK;
}
Example 2: Implementation of the SOAP interface.
Back to Article