/*
*
* ProLinga-Soap
*
* Copyright (C) 2002-2008 Xobas Software.
* All rights reserved.
*
* This file is part of ProLinga-Soap.
*
* ProLinga-Soap 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 3 of the License, or
* (at your option) any later version.
*
* ProLinga-Soap 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 ProLinga-Soap. If not, see .
*
* More information is available at the following addresses:
*
* Website : http://www.prolinga.org
*
* Email : prolinga-list@prolinga.org
*
*
*/
#include
int main()
{
PlSoapService sservice;
/* Start as a web service. */
sservice.soapServiceStart("localhost", 8020, 3, 6, "/tmp/mySoap.log", 5);
/* Return */
return 0;
}
void PlSoapLink(PlSoapProcessPtr link)
{
/* Every received request will access this function. */
/* Get Request */
xmlDocPtr docReq;
docReq = link->getRequest();
/* Print on standard out */
xmlNodePtr curReq;
xmlBufferPtr bufReq;
bufReq = xmlBufferCreate();
curReq = xmlDocGetRootElement(docReq);
xmlNodeDump(bufReq, docReq, curReq, 0, 1);
printf("%s\n", (char *)xmlBufferContent(bufReq));
xmlBufferFree(bufReq);
/* Create a response */
xmlDocPtr docRes;
xmlNodePtr curRes;
docRes = xmlNewDoc((const xmlChar *)"1.0");
docRes->children = xmlNewDocNode(docRes, NULL, (const xmlChar *)"ProLinga", NULL);
curRes = xmlDocGetRootElement(docRes);
xmlNewTextChild (curRes, NULL, (const xmlChar *)"String", (const xmlChar *)"Your request has been served.");
/* Send back Response */
link->putResponse(docRes);
}