Home » getChannelSetAll

getChannelSetAll

Description

Gets the active channel sets 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 GetChannelSetAllTest {

    public static void main(String[] args) {
        GetChannelSetAllTest.getChannelSetAllTest();
    }

    private static void getChannelSetAllTest() {
        
        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);
            ChannelSet[] channelSetAll = stub.getChannelSetAll().get_return();
     
            System.out.println("GET_CHANNEL_SET_ALL COMPLETE!");
            for (ChannelSet channelSet : channelSetAll) {
                System.out.println(channelSet.getId() + " " + channelSet.getName());
            }

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

SOAP

Request

POST /axis2/services/ZEDOAPI?wsdl HTTP/1.0 Host: localhost:8080 User-Agent: NuSOAP/0.7.2 (1.1.1.1) Content-Type: text/xml; charset=ISO-8859-1 SOAPAction: "urn:getChannelSetAll" Content-Length:506<? xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<user>eric@zedo.com</user>
<password xmlns="http://zapi.zedo.com">twinkle</password>
<network>525</network>
<callinfo>zapiCall</callinfo>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response

HTTP/1.0 200 OK Date: Fri, 23 May 2008 07:15:41 GMT Server: Simple-Server/1.1 Content-Type: text/xml; charset=ISO-8859-1 Connection: Close<? xml version='1.0' encoding='ISO-8859-1'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getChannelSetAllResponse xmlns:ns="http://zapi.zedo.com" xmlns:ax29="http://util.zedo.com/xsd" xmlns:ax28="http://base.zedo.com/xsd" xmlns:ax212="http://soap.reportengine.zedo.com/xsd"xmlns:ax211="http://client.api.zedo.com/xsd">
<ns:return type="com.zedo.api.client.ChannelSet">
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>171655</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>191045</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>339866</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>339867</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:id>962</ax211:id>
<ax211:name>r2test</ax211:name>
<ax211:status>A</ax211:status>
</ns:return>
<ns:return type="com.zedo.api.client.ChannelSet">
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>393453</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>393454</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:id>1160</ax211:id>
<ax211:name>r4tst</ax211:name>
<ax211:status>A</ax211:status>
</ns:return>
<ns:return type="com.zedo.api.client.ChannelSet">
<ax211:channelIds type="com.zedo.api.client.ChannelId">
<ax211:assetId>191045</ax211:assetId>
<ax211:status>A</ax211:status>
</ax211:channelIds>
<ax211:id>1418</ax211:id>
<ax211:name>NewChannelSet</ax211:name>
<ax211:status>A</ax211:status>
</ns:return>
</ns:getChannelSetAllResponse>
</soapenv:Body>
</soapenv:Envelope>