Loading ...
Sorry, an error occurred while loading the content.

9464need of a main method in the gSOAP client??

Expand Messages
  • leberretanguy
    Sep 19, 2003
    • 0 Attachment

      I am trying to get used to developing Web Services thanks to gSOAP
      but I have a problem I can't resolve. I try to write a client method
      connecting to the server, accessing the remote method
      soap_call_ns__auth() but I can't compile of my code.
      Here is the code and the error:

      #include "soapH.h"
      #include "auth.nsmap"

      essai(char *user, char *password) {

      const char server[] = "xxx.xxx.xx.xxx:8004/auth.cgi";
      struct soap soap;
      int result;
      soap_call_ns__auth(&soap, server, "", user, password, &result);

      return result;

      gcc -Wall -O2 -I../.. essai.c soapC.c soapClient.c ../../stdsoap2.c
      /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crt1.o: In function
      undefined reference to `main'

      if I write the same code in a main method, I don't get this error.
      Can't I do the remote method invocation out of a main method? If I
      can, is there something missing in my code?

      Thank you

    • Show all 2 messages in this topic