开发者

How to catch exceptions from gsoap?

开发者 https://www.devze.com 2023-01-06 04:52 出处:网络
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 i

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; 
}
0

精彩评论

暂无评论...
验证码 换一张
取 消