environment linux, Qt, c, gsoap, Microsoft MapPoint
problem I want an IRC bot which can calculate distances between users and display the local time of a user
solution Modifications to karmabot, which is written in Qt. The MapPoint WebService comes in handy. Although gSoap doesn't like MapPoint straight OOTB. Thus you need to remove "opaque=" from
gsoap-linux-2.7/plugin/httpda.c:243: sprintf(soap->gt;tmpbuf, "Digest realm=\\"%s\\", username=\\"%s\\", nonce=\\"%s\\", uri=\\"%s\\", qop=\\"%s\\", nc=%s, cnonce=\\"%s\\", response=\\"%s\\", opaque=\\"%s\\"", soap->gt;authrealm, soap->gt;userid, data->gt;nonce, soap->gt;path, qop, ncount, cnonce, response, data->gt;opaque);
gsoap-linux-2.7/plugin/httpda.c:245: sprintf(soap->gt;tmpbuf, "Digest realm=\\"%s\\", username=\\"%s\\", nonce=\\"%s\\", uri=\\"%s\\", response=\\"%s\\", opaque=\\"%s\\"", soap->gt;authrealm, soap->gt;userid, data->gt;nonce, soap->gt;path, response, data->gt;opaque);
thanks to this posting.
You need to use httpda.h for digest authentication. Add gsoap-linux-2.7/plugin/httpda.c and gsoap-linux-2.7/plugin/md5evp.c and link against openssl (-lssl). That should do the trick. Because it cost me some time, I'll paste code for a find request:
char* arr[] = { "PopulatedPlace" };
struct mpt__ArrayOfString EntityTypeNames = {1, arr };
struct mpt__FindSpecification spec = {
"MapPoint.World",
"Vienna, Austria",
&EntityTypeNames,
NULL };
struct _mpt__Find req = { &spec };
if(soap_call___ns2__Find(gSoap, NULL, NULL, &req, resp) != SOAP_OK)