00001
00002
00003
00004
00005
00006
00007 #include "ip2locationH.h"
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011
00012 SOAP_SOURCE_STAMP("@(#) ip2locationClient.c ver 2.7.9l 2007-10-11 17:54:47 GMT")
00013
00014
00015 SOAP_FMAC5 int SOAP_FMAC6 soap_call___ns1__IP2Location(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _ns1__IP2Location *ns1__IP2Location, struct _ns1__IP2LocationResponse *ns1__IP2LocationResponse)
00016 { struct __ns1__IP2Location soap_tmp___ns1__IP2Location;
00017 if (!soap_endpoint)
00018 soap_endpoint = "http://ws.fraudlabs.com/ip2locationwebservice.asmx";
00019 if (!soap_action)
00020 soap_action = "http://ws.fraudlabs.com/IP2Location";
00021 soap->encodingStyle = NULL;
00022 soap_tmp___ns1__IP2Location.ns1__IP2Location = ns1__IP2Location;
00023 soap_begin(soap);
00024 soap_serializeheader(soap);
00025 soap_serialize___ns1__IP2Location(soap, &soap_tmp___ns1__IP2Location);
00026 if (soap_begin_count(soap))
00027 return soap->error;
00028 if (soap->mode & SOAP_IO_LENGTH)
00029 { if (soap_envelope_begin_out(soap)
00030 || soap_putheader(soap)
00031 || soap_body_begin_out(soap)
00032 || soap_put___ns1__IP2Location(soap, &soap_tmp___ns1__IP2Location, "-ns1:IP2Location", "")
00033 || soap_body_end_out(soap)
00034 || soap_envelope_end_out(soap))
00035 return soap->error;
00036 }
00037 if (soap_end_count(soap))
00038 return soap->error;
00039 if (soap_connect(soap, soap_endpoint, soap_action)
00040 || soap_envelope_begin_out(soap)
00041 || soap_putheader(soap)
00042 || soap_body_begin_out(soap)
00043 || soap_put___ns1__IP2Location(soap, &soap_tmp___ns1__IP2Location, "-ns1:IP2Location", "")
00044 || soap_body_end_out(soap)
00045 || soap_envelope_end_out(soap)
00046 || soap_end_send(soap))
00047 return soap_closesock(soap);
00048 soap_default__ns1__IP2LocationResponse(soap, ns1__IP2LocationResponse);
00049 if (soap_begin_recv(soap)
00050 || soap_envelope_begin_in(soap)
00051 || soap_recv_header(soap)
00052 || soap_body_begin_in(soap))
00053 return soap_closesock(soap);
00054 soap_get__ns1__IP2LocationResponse(soap, ns1__IP2LocationResponse, "ns1:IP2LocationResponse", "");
00055 if (soap->error)
00056 { if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00057 return soap_recv_fault(soap,1);
00058 return soap_closesock(soap);
00059 }
00060 if (soap_body_end_in(soap)
00061 || soap_envelope_end_in(soap)
00062 || soap_end_recv(soap))
00063 return soap_closesock(soap);
00064 return soap_closesock(soap);
00065 }
00066
00067 #ifdef __cplusplus
00068 }
00069 #endif
00070
00071