Home » getGeoLookups

getGeoLookups

Description

Gets list of geo lookups

Attributes

Function doesn’t accept attributes

Samples

Java

import com.zedo.zapi.*;
import com.zedo.zapi.ZEDOAPIStub.*;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;

public class GetGeoLookupsTest {

    public static void main(String[] args) {
        GetGeoLookupsTest.getGeoLookupsTest();
    }

    private static void getGeoLookupsTest() {
        
        try {
          
            ZEDOAPIStub stub = new ZEDOAPIStub("http://api.zedo.com/v8/?wsdl&java");

                stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "user", "zedoapi"),     "example@example.com");
                stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "password", "zedoapi"),     "password");
            stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "network", "zedoapi"),  "525");
            stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10 * 60 * 1000);
            
            Thread.sleep(1000);
            GeoLookup[] geoLookups = stub.getGeoLookups().get_return();
     
            System.out.println("getGeoLookupsTest COMPLETE!");
            for (GeoLookup element : geoLookups) {
                System.out.println(element.getGeoId() + " " + element.getMetroName());
            }

        } catch (Exception e) {
            System.err.println("ERROR: getGeoLookupsTest FAILED!");
            System.err.println("Exception: " + e.getMessage());
            if (e instanceof AxisFault) {
                AxisFault af = (AxisFault) e;
                System.err.println("AxisFault's detail: " + af.getDetail());
                af.printStackTrace();
            } else {
                e.printStackTrace();
            }
        }
    }
}

PHP

 include_once './zlib/ZEDOAPI.php';
        
        /**
         *Create Client Stub
         */
        $config = Array();
        $config['location'] = 'http://api.zedo.com/v8/?wsdl&php';       //URL of the SOAP server to send the request to
        $config['exceptions'] = true;                                                                                                   //Enable Exception Handling
        
        $stub = new ZEDOAPI($config);
        
        $header = Array();
        $header[0] = new SoapHeader('http://api.zedo.com','user', 'example@example.com');
        $header[1] = new SoapHeader('http://api.zedo.com','password', 'password');
        $header[2] = new SoapHeader('http://api.zedo.com','network','525');
        $header[3] = new SoapHeader('http://api.zedo.com','callinfo','zapiCall');
        
        $stub->__setSoapHeaders($header);
        
        /**
         *Define Call Parameters 
         */
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->getGeoLookups();
        }catch (SoapFault $ex) {
           var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "GET GEOLOOKUPS FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        $tmp = new getGeoLookupsResponse($response);
        $geoLookups = $tmp->return;
        echo "GET GEOLOOKUPS COMPLETE - RESPONSE : \n";
        print_r($geoLookups);

SOAP

Request

POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getGeoLookups"
User-Agent: Axis2
Host: dev08.juhu.zedo.com:2000
Transfer-Encoding: chunked
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
<zedoapi:user xmlns:zedoapi="http://api.zedo.com">example@example.com</zedoapi:user>
<zedoapi:password xmlns:zedoapi="http://api.zedo.com">password</zedoapi:password>
<zedoapi:network xmlns:zedoapi="http://api.zedo.com">525</zedoapi:network>
</soapenv:Header>
<soapenv:Body />
</soapenv:Envelope>

Response

HTTP/1.1 200 OK
Date: Thu, 21 Jan 2016 05:55:01 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getGeoLookupsResponse"
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getGeoLookupsResponse xmlns:ns="http://zapi.zedo.com" xmlns:ax21="http://base.zedo.com/xsd" xmlns:ax22="http://util.zedo.com/xsd" xmlns:ax25="http://soap.reportengine.zedo.com/xsd" xmlns:ax24="http://client.api.zedo.com/xsd">
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42575</ax24:geoId>
<ax24:metroCode>42574</ax24:metroCode>
<ax24:metroId>42574</ax24:metroId>
<ax24:metroName>Moorefield</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42576</ax24:geoId>
<ax24:metroCode>42575</ax24:metroCode>
<ax24:metroId>42575</ax24:metroId>
<ax24:metroName>Mount Clare</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42577</ax24:geoId>
<ax24:metroCode>42576</ax24:metroCode>
<ax24:metroId>42576</ax24:metroId>
<ax24:metroName>Mount Hope</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42578</ax24:geoId>
<ax24:metroCode>42577</ax24:metroCode>
<ax24:metroId>42577</ax24:metroId>
<ax24:metroName>Mount Nebo</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42579</ax24:geoId>
<ax24:metroCode>42578</ax24:metroCode>
<ax24:metroId>42578</ax24:metroId>
<ax24:metroName>Mullens</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42580</ax24:geoId>
<ax24:metroCode>42579</ax24:metroCode>
<ax24:metroId>42579</ax24:metroId>
<ax24:metroName>New Cumberland</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42581</ax24:geoId>
<ax24:metroCode>42580</ax24:metroCode>
<ax24:metroId>42580</ax24:metroId>
<ax24:metroName>Newell</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42582</ax24:geoId>
<ax24:metroCode>42581</ax24:metroCode>
<ax24:metroId>42581</ax24:metroId>
<ax24:metroName>Old Fields</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
<ns:return type="com.zedo.api.client.GeoLookup">
<ax24:countryCode>360</ax24:countryCode>
<ax24:countryId>360</ax24:countryId>
<ax24:countryName>USA</ax24:countryName>
<ax24:geoId>42583</ax24:geoId>
<ax24:metroCode>42582</ax24:metroCode>
<ax24:metroId>42582</ax24:metroId>
<ax24:metroName>Pence Springs</ax24:metroName>
<ax24:stateCode>54</ax24:stateCode>
<ax24:stateId>13115</ax24:stateId>
<ax24:stateName>West Virginia</ax24:stateName>
</ns:return>
</ns:getGeoLookupsResponse>
</soapenv:Body>
</soapenv:Envelope>