1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
/*
* Copyright (C) 2004-2005 by CERN/IT/GD/CT & CNRS/IN2P3/LAL
* All rights reserved
*/
// $Id: soapcallns1.ic,v 1.1 2005/04/20 09:06:24 grodid Exp $
char **faultcode;
char **faultstring;
char **faultdetail;
#define SOAP_CALL_NS1(func) \
while (1) { \
if (soap_call_ns1__srm ## func (&soap, srm_endpoint, "srm" #func, \
&req, &rep)) { \
faultcode = (char**) soap_faultcode(&soap); \
faultstring = (char**) soap_faultstring(&soap); \
faultdetail = (char**) soap_faultdetail(&soap); \
printf (" SOAP fault processing:\ncode: %s\nstring: %s\ndetail: %s\n", faultcode[0], faultstring[0], faultdetail[0]); \
if ( ! strcmp(faultcode[0], "SOAP-ENV:Client") || ! strcmp(faultcode[0], "SOAP-ENV:Server") ) { \
printf (" SOAP fault: restarting soap_call_ns1__srm" #func "\n"); \
usleep(1000); \
continue; \
} else { \
soap_print_fault (&soap, stderr); \
soap_print_fault_location (&soap, stderr); \
soap_end (&soap); \
exit (1); \
} \
} \
break; \
}
#define SOAP_CALL_NS1R(func) \
while (1) { \
if (soap_call_ns1__srm ## func (&soap, srm_endpoint, "srm" #func, \
&sreq, &srep)) { \
faultcode = (char**) soap_faultcode(&soap); \
faultstring = (char**) soap_faultstring(&soap); \
faultdetail = (char**) soap_faultdetail(&soap); \
printf (" SOAP fault processing:\ncode: %s\nstring: %s\ndetail: %s\n", faultcode[0], faultstring[0], faultdetail[0]); \
if ( ! strcmp(faultcode[0], "SOAP-ENV:Client") || ! strcmp(faultcode[0], "SOAP-ENV:Server") ) { \
printf (" SOAP fault: restarting soap_call_ns1__srm" #func "\n"); \
usleep(1000); \
continue; \
} else { \
soap_print_fault (&soap, stderr); \
soap_print_fault_location (&soap, stderr); \
soap_end (&soap); \
exit (1); \
} \
} \
break; \
}
|