Home » getAdvertiser

getAdvertiser

Description

 

Gets advertiser with given id

Attributes

FieldTypeDescriptionRequired
idintAssetId of the advertisertrue

Samples

Java

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

public class GetAdvertiserTest {

    public static void main(String[] args) {
        GetAdvertiserTest.getAdvertiserTest();
    }

    private static void getAdvertiserTest() {
        
        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);
            
            GetAdvertiser ga = new GetAdvertiser();
            ga.setParam0(320315);
            Thread.sleep(3000);
            Advertiser a = stub.getAdvertiser(ga).get_return();
    
            System.out.println("GET_ADVERTISER COMPLETE!");
            System.out.println("PLEASE: " + a.getId() + " " + a.getName());

        } catch (Exception e) {
            System.err.println("ERROR: GET_ADVERTISER 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 
         */
        $advertiser_id = 1350182;
        $param = new getAdvertiser($advertiser_id);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->getAdvertiser($param);
        }catch (SoapFault $ex) {
         var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "GET ADVERTISER FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        $tmp = new getAdvertiserResponse($response);
        $getAdvertiser = $tmp->return;
        echo "GET ADVERTISER COMPLETE - RESPONSE : \n";
        print_r($getAdvertiser);

SOAP

Request


POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getAdvertiser"
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>
<ns5:getAdvertiser xmlns:ns5="http://zapi.zedo.com">
<ns5:id>1173688</ns5:id>
</ns5:getAdvertiser>
</soapenv:Body>
</soapenv:Envelope>

Response


HTTP/1.1 200 OK
Date: Thu, 21 Jan 2016 04:49:36 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getAdvertiserResponse"
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getAdvertiserResponse xmlns:ns="http://zapi.zedo.com">
<ns:return 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" type="com.zedo.api.client.Advertiser">
<ax24:actionType>1</ax24:actionType>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>1</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name>myNameis</ax24:name>
<ax24:rate>4.0</ax24:rate>
<ax24:status>A</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>2</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name>qwerty</ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>A</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>3</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>4</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>5</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name>rty </ax24:name>
<ax24:rate>9.0</ax24:rate>
<ax24:status>A</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>6</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>7</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>8</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>9</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:actions type="com.zedo.api.client.Action">
<ax24:itemNumber>10</ax24:itemNumber>
<ax24:maxLifeTime>15</ax24:maxLifeTime>
<ax24:name> </ax24:name>
<ax24:rate>0.0</ax24:rate>
<ax24:status>I</ax24:status>
<ax24:url>http://</ax24:url>
</ax24:actions>
<ax24:billingContact type="com.zedo.api.client.Contact">
<ax24:address1>er</ax24:address1>
<ax24:address2>er</ax24:address2>
<ax24:city>er</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>er</ax24:country>
<ax24:email>mail</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>firstName</ax24:firstName>
<ax24:lastName>er</ax24:lastName>
<ax24:phone>er</ax24:phone>
<ax24:state>er</ax24:state>
<ax24:zipCode>er</ax24:zipCode>
</ax24:billingContact>
<ax24:createdBy>41107</ax24:createdBy>
<ax24:createdDate>2016-01-20 04:24:39</ax24:createdDate>
<ax24:id>1173688</ax24:id>
<ax24:max_lifetime>15</ax24:max_lifetime>
<ax24:modifiedBy>41107</ax24:modifiedBy>
<ax24:modifiedDate>2016-01-20 04:24:39</ax24:modifiedDate>
<ax24:name>ads1</ax24:name>
<ax24:salesContact type="com.zedo.api.client.Contact">
<ax24:address1>drty</ax24:address1>
<ax24:address2>ert</ax24:address2>
<ax24:city>ert</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>sdf</ax24:country>
<ax24:email>etf</ax24:email>
<ax24:fax>34</ax24:fax>
<ax24:firstName>wer</ax24:firstName>
<ax24:lastName>wrwe</ax24:lastName>
<ax24:phone>52346</ax24:phone>
<ax24:state>45</ax24:state>
<ax24:zipCode>64</ax24:zipCode>
</ax24:salesContact>
<ax24:status>A</ax24:status>
</ns:return>
</ns:getAdvertiserResponse>
</soapenv:Body>
</soapenv:Envelope>