Description
Gets list of age 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 GetAgeLookupsTest { public static void main(String[] args) { GetAgeLookupsTest.getAgeLookupsTest(); } private static void getAgeLookupsTest() { 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); Age[] ages = stub.getAgeLookups().get_return(); System.out.println("getAgeLookupsTest COMPLETE!"); for (Age age : ages) { System.out.println(age.getId() + " " + age.getName()); } } catch (Exception e) { System.err.println("ERROR: getAgeLookupsTest 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->getAgeLookups(); }catch (SoapFault $ex) { var_dump($ex->faultcode, $ex->faultstring, $ex->detail); echo "GET AGELOOKUPS FAILED\n"; die(); } /** * Response */ $tmp = new getAgeLookupsResponse($response); $ageLookups = $tmp->return; echo "GET AGELOOKUPS COMPLETE - RESPONSE : \n"; print_r($ageLookups);
SOAP
Request
POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action="urn:getAgeLookups" 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: Wed, 20 Jan 2016 06:30:51 GMT Server: Simple-Server/1.1 Transfer-Encoding: chunked Content-Type: application/soap+xml; charset=UTF-8; action="urn:getAgeLookupsResponse" <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <ns:getAgeLookupsResponse 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.Age"> <ax24:code>28</ax24:code> <ax24:createdById>6312</ax24:createdById> <ax24:createdDate>2006-12-11 00:00:00</ax24:createdDate> <ax24:id>477</ax24:id> <ax24:modifiedById>6312</ax24:modifiedById> <ax24:modifiedDate>2006-12-11 00:00:00</ax24:modifiedDate> <ax24:name>28</ax24:name> <ax24:status>A</ax24:status> </ns:return> <ns:return type="com.zedo.api.client.Age"> <ax24:code>67</ax24:code> <ax24:createdById>6312</ax24:createdById> <ax24:createdDate>2006-12-11 00:00:00</ax24:createdDate> <ax24:id>516</ax24:id> <ax24:modifiedById>6312</ax24:modifiedById> <ax24:modifiedDate>2006-12-11 00:00:00</ax24:modifiedDate> <ax24:name>67</ax24:name> <ax24:status>A</ax24:status> </ns:return> <ns:return type="com.zedo.api.client.Age"> <ax24:code>68</ax24:code> <ax24:createdById>6312</ax24:createdById> <ax24:createdDate>2006-12-11 00:00:00</ax24:createdDate> <ax24:id>517</ax24:id> <ax24:modifiedById>6312</ax24:modifiedById> <ax24:modifiedDate>2006-12-11 00:00:00</ax24:modifiedDate> <ax24:name>68</ax24:name> <ax24:status>A</ax24:status> </ns:return> <ns:return type="com.zedo.api.client.Age"> <ax24:code>69</ax24:code> <ax24:createdById>6312</ax24:createdById> <ax24:createdDate>2006-12-11 00:00:00</ax24:createdDate> <ax24:id>518</ax24:id> <ax24:modifiedById>6312</ax24:modifiedById> <ax24:modifiedDate>2006-12-11 00:00:00</ax24:modifiedDate> <ax24:name>69</ax24:name> <ax24:status>A</ax24:status> </ns:return> </ns:getAgeLookupsResponse> </soapenv:Body> </soapenv:Envelope>