Home » getCustomDemographicLookups

getCustomDemographicLookups

Description

Gets list of custom demographic 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 GetCustomDemographicLookupsTest {

    public static void main(String[] args) {
        GetCustomDemographicLookupsTest.getCustomDemographicLookupsTest();
    }

    private static void getCustomDemographicLookupsTest() {
       
        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(5000);
            CustomDemographic[] demograpthics = stub.getCustomDemographicLookups().get_return();
     
            System.out.println("getCustomDemographicLookupsTest COMPLETE!");
            for (CustomDemographic cd : demograpthics) {
                System.out.println(cd.getId() + " " + cd.getName());
            }

        } catch (Exception e) {
            System.err.println("ERROR: getCustomDemographicLookupsTest 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->getCustomDemographicLookups();
        }catch (SoapFault $ex) {
           var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "GET CUSTOMDEMOGRAPHICLOOKUPS FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        $tmp = new getCustomDemographicLookupsResponse($response);
        $customDemographicLookups = $tmp->return;
        echo "GET CUSTOMDEMOGRAPHICLOOKUPS COMPLETE - RESPONSE : \n";
        print_r($customDemographicLookups);

SOAP

Request

POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getCustomDemographicLookups"
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:41:55 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getCustomDemographicLookupsResponse"
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getCustomDemographicLookupsResponse 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.CustomDemographic">
<ax24:code>147</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:47:26.772</ax24:createdDate>
<ax24:id>11819</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:47:26.772</ax24:modifiedDate>
<ax24:name>1.05</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.CustomDemographic">
<ax24:code>155</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:54:16.859</ax24:createdDate>
<ax24:id>11828</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:54:16.859</ax24:modifiedDate>
<ax24:name>10.50</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.CustomDemographic">
<ax24:code>157</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:54:53.803</ax24:createdDate>
<ax24:id>11830</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:54:53.803</ax24:modifiedDate>
<ax24:name>11.55</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.CustomDemographic">
<ax24:code>158</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:55:20.618</ax24:createdDate>
<ax24:id>11831</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:55:20.618</ax24:modifiedDate>
<ax24:name>12.60</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.CustomDemographic">
<ax24:code>159</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:55:39.914</ax24:createdDate>
<ax24:id>11832</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:55:39.914</ax24:modifiedDate>
<ax24:name>13.65</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.CustomDemographic">
<ax24:code>160</ax24:code>
<ax24:createdById>39018</ax24:createdById>
<ax24:createdDate>2010-11-24 21:55:51.81</ax24:createdDate>
<ax24:id>11833</ax24:id>
<ax24:label>CTC</ax24:label>
<ax24:modifiedById>39018</ax24:modifiedById>
<ax24:modifiedDate>2010-11-24 21:55:51.81</ax24:modifiedDate>
<ax24:name>14.70</ax24:name>
<ax24:status>A</ax24:status>
</ns:return>
</ns:getCustomDemographicLookupsResponse>
</soapenv:Body>
</soapenv:Envelope>