title: gSOAP Error 400 HTTP Bad Request
body: <p>I am getting an error when i make a call like :</p>
  
  <pre><code>soap_call___ns1__Sumar(soap,NULL,NULL,&amp;oper,&amp;resp)
  </code></pre>
  
  <blockquote>
    <p>Error 400 fault al source [no subcode] "HTTP Error: 400 Bad Request"
    Detail: [no detail]</p>
  </blockquote>
  
  <p>ASMX Service was published on IIS, on local network at the same PC. I can consume the service from a c# client without problems but when i try to consume the service via gSOAP client it show the error.</p>
  
  <p>Im using gSOAP 2.8.29, i think there was no problem building the files with wsdl2h and soapcpp2 tools. Here is my code. </p>
  
  <p>Please, if someone know the cause of this error help me.
  Thanks all.</p>
  
  <p><strong>gSOAP Client</strong></p>
  
  <pre><code>#include "stdio.h"
  
  #include "WCdataSoap.nsmap" 
  #include "soapH.h" 
  
  int main()
  {
    struct soap *soap = soap_new(); 
    struct _ns1__SumarResponse sum;
    struct _ns1__Sumar oper;
    oper.a = 2;
    oper.b = 2;
    printf("a = %d\n", oper.a);
    printf("b = %d\n", oper.b);
  
    if (soap_call___ns1__Sumar(soap, NULL, NULL, &amp;oper, &amp;sum) == SOAP_OK)
      printf("Sum = %d\n", sum);
    else
      soap_print_fault(soap, stderr);
  
    soap_destroy(soap); 
    soap_end(soap); 
    soap_free(soap); 
  
  }
  </code></pre>
  
  <p><strong>soapClientC.c</strong></p>
  
  <pre><code>#if defined(__BORLANDC__)
  #pragma option push -w-8060
  #pragma option push -w-8004
  #endif
  #include "soapH.h"
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.8.29 2016-04-20 02:44:39 GMT")
  
  
  SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__Sumar(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _ns1__Sumar *ns1__Sumar, struct _ns1__SumarResponse *ns1__SumarResponse)
  {   struct __ns1__Sumar soap_tmp___ns1__Sumar;
      if (soap_endpoint == NULL)
          soap_endpoint = "http://localhost/MyService/WCdata.asmx";
      if (soap_action == NULL)
          soap_action = "http://localhost/MyService/Sumar";
      soap_tmp___ns1__Sumar.ns1__Sumar = ns1__Sumar;
      soap_begin(soap);
      soap-&gt;encodingStyle = NULL;
      soap_serializeheader(soap);
      soap_serialize___ns1__Sumar(soap, &amp;soap_tmp___ns1__Sumar);
      if (soap_begin_count(soap))
          return soap-&gt;error;
      if (soap-&gt;mode &amp; SOAP_IO_LENGTH)
      {   if (soap_envelope_begin_out(soap)
           || soap_putheader(soap)
           || soap_body_begin_out(soap)
           || soap_put___ns1__Sumar(soap, &amp;soap_tmp___ns1__Sumar, "-ns1:Sumar", NULL)
           || soap_body_end_out(soap)
           || soap_envelope_end_out(soap))
               return soap-&gt;error;
      }
      if (soap_end_count(soap))
          return soap-&gt;error;
      if (soap_connect(soap, soap_endpoint, soap_action)
       || soap_envelope_begin_out(soap)
       || soap_putheader(soap)
       || soap_body_begin_out(soap)
       || soap_put___ns1__Sumar(soap, &amp;soap_tmp___ns1__Sumar, "-ns1:Sumar", NULL)
       || soap_body_end_out(soap)
       || soap_envelope_end_out(soap)
       || soap_end_send(soap))
          return soap_closesock(soap);
      if (!ns1__SumarResponse)
          return soap_closesock(soap);
      soap_default__ns1__SumarResponse(soap, ns1__SumarResponse);
      if (soap_begin_recv(soap)
       || soap_envelope_begin_in(soap)
       || soap_recv_header(soap)
       || soap_body_begin_in(soap))
          return soap_closesock(soap);
      soap_get__ns1__SumarResponse(soap, ns1__SumarResponse, "ns1:SumarResponse", NULL);
      if (soap-&gt;error)
          return soap_recv_fault(soap, 0);
      if (soap_body_end_in(soap)
       || soap_envelope_end_in(soap)
       || soap_end_recv(soap))
          return soap_closesock(soap);
      return soap_closesock(soap);
  }
  
  #ifdef __cplusplus
  }
  #endif
  
  #if defined(__BORLANDC__)
  #pragma option pop
  #pragma option pop
  #endif
  </code></pre>
  
  <p><strong>soapH.h</strong></p>
  
  <pre><code>#ifndef soapH_H
  #define soapH_H
  #include "soapStub.h"
  #ifdef __cplusplus
  extern "C" {
  #endif
  #ifndef WITH_NOIDREF
  SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
  SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);
  #endif
  SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap*, int*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
  SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);
  
  SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap);
  
  #ifndef SOAP_TYPE_byte_DEFINED
  #define SOAP_TYPE_byte_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap*, char *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*);
  SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*);
  
  #ifndef soap_write_byte
  #define soap_write_byte(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || soap_put_byte(soap, data, "byte", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*);
  
  #ifndef soap_read_byte
  #define soap_read_byte(soap, data) ( soap_begin_recv(soap) || !soap_get_byte(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE_int_DEFINED
  #define SOAP_TYPE_int_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap*, int *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*);
  SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*);
  
  #ifndef soap_write_int
  #define soap_write_int(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || soap_put_int(soap, data, "int", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*);
  
  #ifndef soap_read_int
  #define soap_read_int(soap, data) ( soap_begin_recv(soap) || !soap_get_int(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_SOAP_ENV__Fault_DEFINED
  #define SOAP_TYPE_SOAP_ENV__Fault_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*);
  
  #ifndef soap_write_SOAP_ENV__Fault
  #define soap_write_SOAP_ENV__Fault(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Fault(soap, data), 0) || soap_put_SOAP_ENV__Fault(soap, data, "SOAP-ENV:Fault", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*);
  
  #ifndef soap_read_SOAP_ENV__Fault
  #define soap_read_SOAP_ENV__Fault(soap, data) ( ((data) ? (soap_default_SOAP_ENV__Fault(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get_SOAP_ENV__Fault(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_SOAP_ENV__Reason_DEFINED
  #define SOAP_TYPE_SOAP_ENV__Reason_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap*, const char*, int, const struct SOAP_ENV__Reason *, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *, const char*, const char*);
  
  #ifndef soap_write_SOAP_ENV__Reason
  #define soap_write_SOAP_ENV__Reason(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Reason(soap, data), 0) || soap_put_SOAP_ENV__Reason(soap, data, "SOAP-ENV:Reason", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*);
  
  #ifndef soap_read_SOAP_ENV__Reason
  #define soap_read_SOAP_ENV__Reason(soap, data) ( ((data) ? (soap_default_SOAP_ENV__Reason(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get_SOAP_ENV__Reason(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_SOAP_ENV__Detail_DEFINED
  #define SOAP_TYPE_SOAP_ENV__Detail_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*);
  
  #ifndef soap_write_SOAP_ENV__Detail
  #define soap_write_SOAP_ENV__Detail(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Detail(soap, data), 0) || soap_put_SOAP_ENV__Detail(soap, data, "SOAP-ENV:Detail", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*);
  
  #ifndef soap_read_SOAP_ENV__Detail
  #define soap_read_SOAP_ENV__Detail(soap, data) ( ((data) ? (soap_default_SOAP_ENV__Detail(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get_SOAP_ENV__Detail(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_SOAP_ENV__Code_DEFINED
  #define SOAP_TYPE_SOAP_ENV__Code_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*);
  
  #ifndef soap_write_SOAP_ENV__Code
  #define soap_write_SOAP_ENV__Code(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Code(soap, data), 0) || soap_put_SOAP_ENV__Code(soap, data, "SOAP-ENV:Code", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*);
  
  #ifndef soap_read_SOAP_ENV__Code
  #define soap_read_SOAP_ENV__Code(soap, data) ( ((data) ? (soap_default_SOAP_ENV__Code(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get_SOAP_ENV__Code(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_SOAP_ENV__Header_DEFINED
  #define SOAP_TYPE_SOAP_ENV__Header_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*);
  
  #ifndef soap_write_SOAP_ENV__Header
  #define soap_write_SOAP_ENV__Header(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Header(soap, data), 0) || soap_put_SOAP_ENV__Header(soap, data, "SOAP-ENV:Header", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*);
  
  #ifndef soap_read_SOAP_ENV__Header
  #define soap_read_SOAP_ENV__Header(soap, data) ( ((data) ? (soap_default_SOAP_ENV__Header(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get_SOAP_ENV__Header(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE___ns1__Sumar_DEFINED
  #define SOAP_TYPE___ns1__Sumar_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default___ns1__Sumar(struct soap*, struct __ns1__Sumar *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize___ns1__Sumar(struct soap*, const struct __ns1__Sumar *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out___ns1__Sumar(struct soap*, const char*, int, const struct __ns1__Sumar *, const char*);
  SOAP_FMAC3 struct __ns1__Sumar * SOAP_FMAC4 soap_in___ns1__Sumar(struct soap*, const char*, struct __ns1__Sumar *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put___ns1__Sumar(struct soap*, const struct __ns1__Sumar *, const char*, const char*);
  
  #ifndef soap_write___ns1__Sumar
  #define soap_write___ns1__Sumar(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize___ns1__Sumar(soap, data), 0) || soap_put___ns1__Sumar(soap, data, "-ns1:Sumar", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct __ns1__Sumar * SOAP_FMAC4 soap_get___ns1__Sumar(struct soap*, struct __ns1__Sumar *, const char*, const char*);
  
  #ifndef soap_read___ns1__Sumar
  #define soap_read___ns1__Sumar(soap, data) ( ((data) ? (soap_default___ns1__Sumar(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get___ns1__Sumar(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE__ns1__SumarResponse_DEFINED
  #define SOAP_TYPE__ns1__SumarResponse_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default__ns1__SumarResponse(struct soap*, struct _ns1__SumarResponse *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__ns1__SumarResponse(struct soap*, const struct _ns1__SumarResponse *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__SumarResponse(struct soap*, const char*, int, const struct _ns1__SumarResponse *, const char*);
  SOAP_FMAC3 struct _ns1__SumarResponse * SOAP_FMAC4 soap_in__ns1__SumarResponse(struct soap*, const char*, struct _ns1__SumarResponse *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put__ns1__SumarResponse(struct soap*, const struct _ns1__SumarResponse *, const char*, const char*);
  
  #ifndef soap_write__ns1__SumarResponse
  #define soap_write__ns1__SumarResponse(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize__ns1__SumarResponse(soap, data), 0) || soap_put__ns1__SumarResponse(soap, data, "ns1:SumarResponse", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct _ns1__SumarResponse * SOAP_FMAC4 soap_get__ns1__SumarResponse(struct soap*, struct _ns1__SumarResponse *, const char*, const char*);
  
  #ifndef soap_read__ns1__SumarResponse
  #define soap_read__ns1__SumarResponse(soap, data) ( ((data) ? (soap_default__ns1__SumarResponse(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get__ns1__SumarResponse(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE__ns1__Sumar_DEFINED
  #define SOAP_TYPE__ns1__Sumar_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default__ns1__Sumar(struct soap*, struct _ns1__Sumar *);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__ns1__Sumar(struct soap*, const struct _ns1__Sumar *);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out__ns1__Sumar(struct soap*, const char*, int, const struct _ns1__Sumar *, const char*);
  SOAP_FMAC3 struct _ns1__Sumar * SOAP_FMAC4 soap_in__ns1__Sumar(struct soap*, const char*, struct _ns1__Sumar *, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put__ns1__Sumar(struct soap*, const struct _ns1__Sumar *, const char*, const char*);
  
  #ifndef soap_write__ns1__Sumar
  #define soap_write__ns1__Sumar(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize__ns1__Sumar(soap, data), 0) || soap_put__ns1__Sumar(soap, data, "ns1:Sumar", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 struct _ns1__Sumar * SOAP_FMAC4 soap_get__ns1__Sumar(struct soap*, struct _ns1__Sumar *, const char*, const char*);
  
  #ifndef soap_read__ns1__Sumar
  #define soap_read__ns1__Sumar(soap, data) ( ((data) ? (soap_default__ns1__Sumar(soap, (data)), 0) : 0) || soap_begin_recv(soap) || !soap_get__ns1__Sumar(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED
  #define SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap*, const char *, int, struct SOAP_ENV__Reason *const*, const char *);
  SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*, const char*, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason **, const char*, const char*);
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED
  #define SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *);
  SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*);
  #endif
  
  #endif
  
  #ifndef WITH_NOGLOBAL
  
  #ifndef SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED
  #define SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *);
  SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*);
  SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*);
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE_PointerTo_ns1__SumarResponse_DEFINED
  #define SOAP_TYPE_PointerTo_ns1__SumarResponse_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__SumarResponse(struct soap*, struct _ns1__SumarResponse *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__SumarResponse(struct soap*, const char *, int, struct _ns1__SumarResponse *const*, const char *);
  SOAP_FMAC3 struct _ns1__SumarResponse ** SOAP_FMAC4 soap_in_PointerTo_ns1__SumarResponse(struct soap*, const char*, struct _ns1__SumarResponse **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__SumarResponse(struct soap*, struct _ns1__SumarResponse *const*, const char*, const char*);
  SOAP_FMAC3 struct _ns1__SumarResponse ** SOAP_FMAC4 soap_get_PointerTo_ns1__SumarResponse(struct soap*, struct _ns1__SumarResponse **, const char*, const char*);
  #endif
  
  #ifndef SOAP_TYPE_PointerTo_ns1__Sumar_DEFINED
  #define SOAP_TYPE_PointerTo_ns1__Sumar_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTo_ns1__Sumar(struct soap*, struct _ns1__Sumar *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTo_ns1__Sumar(struct soap*, const char *, int, struct _ns1__Sumar *const*, const char *);
  SOAP_FMAC3 struct _ns1__Sumar ** SOAP_FMAC4 soap_in_PointerTo_ns1__Sumar(struct soap*, const char*, struct _ns1__Sumar **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTo_ns1__Sumar(struct soap*, struct _ns1__Sumar *const*, const char*, const char*);
  SOAP_FMAC3 struct _ns1__Sumar ** SOAP_FMAC4 soap_get_PointerTo_ns1__Sumar(struct soap*, struct _ns1__Sumar **, const char*, const char*);
  #endif
  
  #ifndef SOAP_TYPE__XML_DEFINED
  #define SOAP_TYPE__XML_DEFINED
  #endif
  
  #ifndef SOAP_TYPE__QName_DEFINED
  #define SOAP_TYPE__QName_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap*, char **);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*);
  SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*);
  
  #ifndef soap_write__QName
  #define soap_write__QName(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || soap_put__QName(soap, data, "QName", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*);
  
  #ifndef soap_read__QName
  #define soap_read__QName(soap, data) ( soap_begin_recv(soap) || !soap_get__QName(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifndef SOAP_TYPE_string_DEFINED
  #define SOAP_TYPE_string_DEFINED
  SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap*, char **);
  SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*);
  SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*);
  SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*);
  
  #ifndef soap_write_string
  #define soap_write_string(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || soap_put_string(soap, data, "string", NULL) || soap_end_send(soap), (soap)-&gt;error )
  #endif
  
  SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*);
  
  #ifndef soap_read_string
  #define soap_read_string(soap, data) ( soap_begin_recv(soap) || !soap_get_string(soap, (data), NULL, NULL) || soap_end_recv(soap), (soap)-&gt;error )
  #endif
  
  #endif
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif
  </code></pre>
  
  <p>And Finally my ASMX file</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Services;
  
  namespace MyService
  {
      /// &lt;summary&gt;
      /// Summary description for WCdata
      /// &lt;/summary&gt;
      [WebService(Namespace = "http://localhost/MyService/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [System.ComponentModel.ToolboxItem(false)]
      // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
      // [System.Web.Script.Services.ScriptService]
      public class WCdata : System.Web.Services.WebService
      {
  
          [WebMethod]
          public int Sumar(int a, int b)
          {
              return (a + b);
          }
      }
  }
  </code></pre>