Home » getPublisherAll

getPublisherAll

Description

Gets the publisher list for the given network

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 GetPublisherAllTest {

    public static void main(String[] args) {
        GetPublisherAllTest.getPublisherAllTest();
    }

    private static void getPublisherAllTest() {
        
        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);
            Publisher[] publisherAll = stub.getPublisherAll().get_return();
     
            System.out.println("GET_PUBLISHER_ALL COMPLETE!");
            for (Publisher publisher : publisherAll) {
                System.out.println(publisher.getId() + " " + publisher.getName());
            }

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

SOAP

Request

POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getPublisherAll"
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 06:12:19 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getPublisherAllResponse"
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getPublisherAllResponse 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.Publisher">
<ax24:billingContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:billingContact>
<ax24:code>0</ax24:code>
<ax24:id>171656</ax24:id>
<ax24:name>zzz</ax24:name>
<ax24:salesContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:salesContact>
<ax24:siteLocation>1234</ax24:siteLocation>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.Publisher">
<ax24:billingContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:billingContact>
<ax24:code>1</ax24:code>
<ax24:id>258599</ax24:id>
<ax24:name>ZEDO</ax24:name>
<ax24:salesContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:salesContact>
<ax24:siteLocation>http://www.zedo.com/</ax24:siteLocation>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.Publisher">
<ax24:billingContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:billingContact>
<ax24:code>2</ax24:code>
<ax24:id>311745</ax24:id>
<ax24:name>Purna</ax24:name>
<ax24:salesContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:salesContact>
<ax24:siteLocation>http://</ax24:siteLocation>
<ax24:status>A</ax24:status>
</ns:return>
<ns:return type="com.zedo.api.client.Publisher">
<ax24:billingContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:billingContact>
<ax24:code>3</ax24:code>
<ax24:id>316784</ax24:id>
<ax24:name>rr</ax24:name>
<ax24:salesContact type="com.zedo.api.client.Contact">
<ax24:address1>
</ax24:address1>
<ax24:address2>
</ax24:address2>
<ax24:city>
</ax24:city>
<ax24:companyName>
</ax24:companyName>
<ax24:country>
</ax24:country>
<ax24:email>
</ax24:email>
<ax24:fax>
</ax24:fax>
<ax24:firstName>
</ax24:firstName>
<ax24:lastName>
</ax24:lastName>
<ax24:phone>
</ax24:phone>
<ax24:state>
</ax24:state>
<ax24:zipCode>
</ax24:zipCode>
</ax24:salesContact>
<ax24:siteLocation>
</ax24:siteLocation>
<ax24:status>A</ax24:status>
</ns:return>
</ns:getPublisherAllResponse>
</soapenv:Body>
</soapenv:Envelope>