views:

23

answers:

1

Hello everyone!

I'm currently building an iphone app based on gsoap for the communication. I'm trying to manage connection problems 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

A: 

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