How to catch exceptions from gsoap?
I'm currently building an iphone app based on gsoap for the communication. I'm trying to manage connection pro开发者_如何学运维blems and I can't find any specific return statement when the device is not connected to host.
Is there a way to get some kind of exceptions when running gsoap send or reicv methods?
Thanks for help,
Romain
From http://www.cs.fsu.edu/~engelen/soap.html there is even a useful function for printing a human readable error message:
#include "soapcalcProxy.h" // get proxy
#include "calc.nsmap" // get namespace bindings
int main()
{
calc s;
double r;
if (s.ns2__add(1.0, 2.0, r) == SOAP_OK)
std::cout << r << std::endl;
else
soap_print_fault(s.soap, stderr);
return 0;
}
精彩评论