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
|
#include <stdio.h>
#include "srmv1H.h"
#include "ISRM.nsmap"
#ifdef GFAL_SECURE
#include "cgsi_plugin.h"
#endif
main(argc, argv)
int argc;
char **argv;
{
int flags;
struct ns5__pingResponse out;
struct soap soap;
if (argc != 2) {
fprintf (stderr, "usage: %s srm_endpoint\n", argv[0]);
exit (1);
}
soap_init (&soap);
#ifdef GFAL_SECURE
flags = CGSI_OPT_DISABLE_NAME_CHECK;
soap_register_plugin_arg (&soap, client_cgsi_plugin, &flags);
#endif
if (soap_call_ns5__ping (&soap, argv[1], "ping", &out)) {
soap_print_fault (&soap, stderr);
exit (1);
}
if (out._Result)
printf ("SRM server is alive\n");
else
printf ("SRM server is not responding\n");
exit (0);
}
|