Home » createCreative

createCreative

Description

 

Creates an Ad within the campaign.

To create a creative set the required values in the creativeCommon object. This Creative object can be set in the Creative field of the createCreative call.

Attributes

 

FieldTypeRequired
CreativeCreativeCommon.True

CreativeCommon

 

FieldTypeDescriptionRequiredAccepted Value
idintA unique number to identify the creative. falseThis is set by default when creative is created.
creativeNamestringCreative Nametrue
statusstringDisplays ad status. falseAccepted values are 'APP' for Approved, 'NYA' for Not Yet Approved, 'PSE' for Pause Serving, 'NA' for Not Applicable, 'REJ' for Reject/Totally Stop Serving, 'HID' for Hide from User Interface, 'PEN' for Pending, 'RET' for Retired.
campaignIdintCampaign Id under which the creative is created.true
clickThroughUrlstringLanding page URL(ClickThroughUrl) for Std Banner Type ads or back up ads.This is a required field in API, but if you don't need this, you can pass empty string.true
dimensionIdintDimension ID. falsedefault is set to 0 ( Full Banner )
altTextstringMessage that appears on the image mouseover.false
creativeTypestringDisplays all the various ad types.true Accepted values are "FLASH TYPEF INPUT, FLASH TYPEF UPLOAD, FLASH TYPEF WITH CLICK, FLASH TYPEF WITHOUT CLICK, FLASH TYPEUploadJScript, FLASH TYPEUploadFlashVideo " for Flash ads, "IFrame" for IFrame ads, "Std Banner" for Standard Banners, "3rd Party" for 3rd Party ads, "TPAdServer" for TPAdServer, "HTML TYPEInput, HTML TYPEUpload, HTML TYPEUploadJScript" for HTML ads, "POP TYPE FILE" for Pop up ads, "Ad Flash Std Banner, Ad Flash Flv, Ad Flash Without Click, Ad Flash With Click" for Flash Ads, "Rich Media Expandable, Rich Media Overlay" for Rich media Ads, and "VAST Inline" for vast type ads.
creativeStandardBannercreativeStandardBannerA Creative Bean for Standard Banner Type creatives. falseThis must be set if creative Type is set as "Std Banner"
creativeIFramecreativeIFrameA Creative Bean for IFrame Type creatives. falseThis must be set if creative Type is set as "IFrame".
creativeThirdPartyAdServercreativeThirdPartyAdServerA Creative Bean for ThirdPartyAdServer Type creatives.false This must be set if creative Type is set as "TPAdServer"
creativeThirdPartycreativeThirdPartyA Creative Bean for 3rd Party Type creatives. falseThis must be set if creative Type is set as "3rd Party".
creativeHtmlInputcreativeHtmlInputA Creative Bean for Html Type creatives. falseThis must be set if creative Type is set as "HTML TYPEInput"
creativeHtmlUploadcreativeHtmlUploadA Creative Bean for Html Type creatives. falseThis must be set if creative Type is set as "HTML TYPEUpload"
creativeHtmlUploadJavaScriptcreativeHtmlUploadJavaScriptA Creative Bean for Html Type creatives. falseThis must be set if creative Type is set as "HTML TYPEUploadJScript".
CreativePopUpFileCreativePopUpFileA Creative Bean for Popup Type creatives. falseThis must be set if creative Type is set as "POP TYPE FILE"
creativeRichMediaOverlaycreativeRichMediaOverlayA Creative Bean for RichMedia Type creatives. falseThis must be set if creative Type is set as "Rich Media Overlay"
CreativeRichMediaUserInitExpandableCreativeRichMediaUserInitExpandableA Creative Bean for RichMedia Type creatives. falseThis must be set if creative Type is set as "Rich Media Expandable
creativeAdInFlashStdBannercreativeAdInFlashStdBannerA Creative Bean for Ad In Flash Type creatives. falseThis must be set if creative Type is set as "Ad Flash Std Banner"
creativeAdInFlashFlvcreativeAdInFlashFlvA Creative Bean for Ad In Flash Type creatives.false This must be set if creative Type is set as "Ad Flash Flv"
creativeAdInFlashWithClickcreativeAdInFlashWithClickA Creative Bean for Ad In Flash Type creatives. falseThis must be set if creative Type is set as "Ad Flash With Click"
creativeAdInFlashWithoutClickcreativeAdInFlashWithoutClickA Creative Bean for Ad In Flash Type creatives. falseThis must be set if creative Type is set as "Ad Flash Without Click"
creativeFlashInputcreativeFlashInputA Creative Bean for Flash Type creatives. falseThis must be set if creative Type is set as "FLASH TYPEF INPUT".
CreativeFlashUploadCreativeFlashUploadA Creative Bean for Flash Type creatives.false This must be set if creative Type is set as "FLASH TYPEF UPLOAD"
creativeFlashUploadJavaScriptcreativeFlashUploadJavaScriptA Creative Bean for Flash Type creatives. falseThis must be set if creative Type is set as "FLASH TYPEUploadJScript"
creativeFlashUploadFlashVideocreativeFlashUploadFlashVideoA Creative Bean for Flash Type creatives. falseThis must be set if creative Type is set as "FLASH TYPEUploadFlashVideo.
creativeFlashWithClickcreativeFlashWithClickA Creative Bean for Flash Type creatives. falseThis must be set if creative Type is set as "FLASH TYPEF WITH CLICK"
creativeFlashWithoutClickcreativeFlashWithoutClickA Creative Bean for Flash Type creatives. falseThis must be set if creative Type is set as "FLASH TYPEF WITHOUT CLICK ".
creativeFlashUploadFlashcreativeFlashUploadFlashA Creative Bean for Flash Type creatives.false This must be set if creative Type is set as "FLASH TYPEUploadFlash"
creativeSliderAdTagcreativeSliderAdTagA Creative Bean for Slider AdTag Type creatives.false This must be set if creative Type is set as "Slider Ad Tag.
creativeSliderIframecreativeSliderIframeA Creative Bean for Slider Iframe Type creatives. falseThis must be set if creative Type is set as "Slider Iframe".
creativeSliderStdBannercreativeSliderStdBannerA Creative Bean for Slider Iframe Type creatives. falseThis must be set if creative Type is set as "Slider Std Banner.
creativeSliderThirdPartyRedirectcreativeSliderThirdPartyRedirectA Creative Bean for Slider Iframe Type creatives.false This must be set if creative Type is set as "Slider Third Party Redirect".
creativeSliderUploadFlash creativeSliderUploadFlash A Creative Bean for Slider Iframe Type creatives.false This must be set if creative Type is set as "Slider Upload Flash".
creativeSliderUploadHTMLcreativeSliderUploadHTMLA Creative Bean for Slider Iframe Type creatives. falseThis must be set if creative Type is set as "Slider Upload HTML".
creativeSliderUploadJavaScriptcreativeSliderUploadJavaScriptA Creative Bean for Slider Iframe Type creatives. falseThis must be set if creative Type is set as "Slider Upload JavaScript".
channelTargeting channelTargeting[ ]Targets the ad to one or more channels.true
channelSetTargetingchannelSetTargeting[ ]Targets the ad to one or more channel sets.false
channelExcludeTargetingchannelExcludeTargeting[ ]Excludes certain channels from the list of targeted channels.false
geoPriorityintSets the priority of the ad geo wise. falseAccepted values are 1 for ON and 0 for OFF.If enabled, the level of the ad is increased by 2 for country, 4 for state and 6 for metro.
geoTypestringCategorizes the geo as country, state, city. falseAccepted values are : NONE, Country, State, City, Country_Set, State_Set, City_Set
geoTargetinggeoTargeting [ ]Targets the creative to one or more geos.true
geoSetTargetinggeoSetTargeting [ ]Targets the creative to one or more geo sets.false
creativeFrequencyCapcreativeFrequencyCapSets a frequency limit for the creative i.e: number of times the ad is viewed per person per day.false
profileTypeintShows the profile type. falseAccepted values are 1 for ON and 0 for OFF.
zipTargetingzipTargeting[ ]Targets the creative to one or more zip codes.false
demographicTargetingdemographicTargeting[ ]Targets the creative to one or more demographics.false
activityTargetingactivityTargeting[ ]Targets the creative to one or more activities.false
dateTargetingdateTargeting[ ]Targets the creative to one or more dates.false
allocateByDaylongImpressions, clicks or actions allocated on a daily basis.false
actionsAllocatedlongSets a limit on the number of actions to be delivered.false
actionsDeliveredlongTo display the number of actions delivered by the creative. Readonly.false
actionsDeltalongDaily actions delivered today. Readonly.false
impressionsAllocatedlongAllots number of impressions to a creative.false
impressionsDeliveredlongDisplays the numbers of impressions delivered.false
impressionsDeltalongImpressions delivered today.false
clicksAllocatedlongSets the number of clicks to be achieved by the creative.false
clicksDeliveredlongTo display the number of clicks delivered by the creative.false
clicksDeltalongClicks delivered today.false
attributeslongThe offset id of the dimension selected. Readonly.false
uploadDeltalongFlag which shows if the creative is pushed or not. Readonly.false
timezoneIdintDisplays the network timezone id. falseReadonly. API uses network timezone internally.
piactionsDeltalongPost impression actions delivered today.false
piactionsDeliveredlongDisplays the number of post click actions delivered.false
frequencyintNumber of occurrences of the ad within a given period.false
versionlongDisplays the uploaded file version.false
genQueuePosition.intfalse
weightintWeight is calculated by the CPM $ value * 100. This sets the priority of the ad within levels.false
additionalFileCreativeFileAllows to upload additional files. Use this property if you need to host files which will be used by your ad code.false
uploadTickintDenotes the time when the creative went live. falseRead only.
DIMENSION_MASKintfalse
DIMENSION_BITS_OFFSET. Readonlyintfalse
CreativeVastInlineCreativeVastInlineA creative bean for vast type creatives. falseThis must be set if creative Type is set to "Vast InLine.
CreativeVastOverlayCreativeVastOverlayA creative bean for vast type creatives. falseThis must be set if creative Type is set to "Vast Overlay".
creativeVastWrapper creativeVastWrapperA creative bean for vast type creatives. falseThis must be set if creative Type is set to "Vast Wrapper".
creativeCustomHtmlAdTemplatecreativeCustomHtmlAdTemplateA Creative Bean for Html Type creatives. falseThis must be set if creative Type is set as "HTML TYPEAdTemplate"
customTargetingCreativeCustomTargetingCustom Targeting targets the creative based on key value pairs.false
browserFlagintSpecifies whether the browser targeting is at the version level or language level or both. falseAccepted values are: 0-> OFF, 1->VERSION ,2-> LANGUAGE ,3->BOTH
creativeBrowserVersionTargetingcreativeBrowserVersionTargeting[ ]Targets the ad to different browser versions. Required if browserFlag is set to 1 or 3false
creativeBrowserLanguageTargetingcreativeBrowserLanguageTargeting[ ]Targets the ad to different browser languages. Required if browserFlag is set to 2 or 3false
researchVendorintSpecifies whether research vendor is setfalseAccepted values are 0 or 1.
ioLineItemRefStringSets the IOLineItem for a creativefalseA valid IOLineItem name
tagsTags[ ]Sets the tags for the creativefalseMaximum no. of tags allowed are 5.

Samples

Java

Ads in Flash

/*This Template shows Sample Code To Create Ad In Flash Standard Banner type Creative */
import com.zedo.zapi.ZEDOAPIStub;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreative();
    }

    private static void createCreative() {
      System.out.println(3);
      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);

        ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
        cc.setCreativeName("creative_Ad_in_Flash_Std_Banner_001");
        cc.setCampaignId(795661);
        cc.setCreativeType("Ad Flash Std Banner");
        cc.setStatus("APP");
        cc.setClickThroughUrl("http://www.drive-more-leads.com/zedo");
        cc.setAltText("Test_1");
        cc.setImpressionsAllocated(-1);

        ZEDOAPIStub.CreativeChannelSetTargeting[] ccst = new ZEDOAPIStub.CreativeChannelSetTargeting[1];
        ccst[0]= new ZEDOAPIStub.CreativeChannelSetTargeting();
        ccst[0].setChannelSetId(4970);
        ccst[0].setStatus("A");
        cc.setChannelSetTargeting(ccst);

        ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
        cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[0].setChannelId(918415);
        cct[0].setStatus("A");
        cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[1].setChannelId(918413);
        cct[1].setStatus("A");
        cc.setChannelTargeting(cct);

        ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
        cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
        cgt[0].setGeoId(1);
        cgt[0].setStatus("A");
        cc.setGeoTargeting(cgt);
        cc.setGeoType("NONE");

//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);

        ZEDOAPIStub.CreativeAdInFlashStdBanner bean = new ZEDOAPIStub.CreativeAdInFlashStdBanner();

        ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[3];
        cp[0] = new ZEDOAPIStub.CreativeProperty();
        cp[0].setAttribute("IN_FLASH_TYPE");
        cp[0].setValue("IN_STD_BANNER");
        cp[1] = new ZEDOAPIStub.CreativeProperty();
        cp[1].setAttribute("TARGET_WINDOW");
        cp[1].setValue("_blank");
        cp[2] = new ZEDOAPIStub.CreativeProperty();
        cp[2].setAttribute("IN_FLASH_CLICK");
        cp[2].setValue("http://www.google.com");
        bean.setCreativePropertiesNecessary(cp);

        ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
        cpa.setAttribute("IN_FLASH_IMG_URL");
        cpa.setValue("http://www.allbestwallpapers.com/vehicle/toyota.gif");
        bean.addCreativePropertiesAdditional(cpa);

        cc.setCreativeAdInFlashStdBanner(bean);
ZEDOAPIStub.Tag[] tag= new ZEDOAPIStub.Tag[3];
 tag[0] = new ZEDOAPIStub.Tag();
 tag[0].setName("tag5");
 tag[0].setValue("value5");
 tag[1] = new ZEDOAPIStub.Tag();
 tag[1].setName("tag6");
 tag[1].setValue("value6");
 tag[2] = new ZEDOAPIStub.Tag();
 tag[2].setName("tag1");
 tag[2].setValue("value1");
 c.setTags(tag);

ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative(); param.setCreative(cc);
 Thread.sleep(1000); 
ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param); 
System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!"); 
System.out.println("PLEASE: " + cccr.get_return().getCreativeName() + " " + cccr.get_return().getId()); 
} catch (Exception e) {
 System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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(); 
} 
}
 }
 private static byte[] getFile(String name) {
 try {
 java.io.FileInputStream fis = new java.io.FileInputStream(name); 
byte[] body = new byte[fis.available()];
 fis.read(body); 
return body;
 } catch (FileNotFoundException e) { System.err.println(e.getMessage()); 
e.printStackTrace(); 
} catch (IOException e) { 
System.err.println(e.getMessage());
 e.printStackTrace(); 
} 
return new byte[0]; 
}
}

HTML Input

/* Sample Code To Create HTML Input type Creative */
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import com.zedo.zapi.ZEDOAPIStub;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreativeTest();
    }

    private static void createCreativeTest() {
      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);

         ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
         cc.setCreativeName("Creative_HTML_input");
         cc.setCampaignId(694801);
         cc.setCreativeType("HTML TYPEInput");
         cc.setStatus("APP");
         cc.setClickThroughUrl("http://");
         cc.setAltText("Test_1");
         cc.setImpressionsAllocated(-1);

         ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
         cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
         cct[0].setChannelId(400460);
         cct[0].setStatus("A");
         cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
         cct[1].setChannelId(602025);
         cct[1].setStatus("A");
         cc.setChannelTargeting(cct);

         ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
         cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
         cgt[0].setGeoId(480);        
         cgt[0].setStatus("A");
         cc.setGeoTargeting(cgt);
         cc.setGeoType("State");

         ZEDOAPIStub.CreativeFrequencyCap[] cfc = new ZEDOAPIStub.CreativeFrequencyCap[1];
         cfc[0] = new ZEDOAPIStub.CreativeFrequencyCap();
         cfc[0].setFreqCapType(1);
         cfc[0].setCap(12);              
         cfc[0].setDuration(5);         
         cfc[0].setDurationType(2);      
         cfc[0].setStatus("A");
         cc.setCreativeFrequencyCaps(cfc);


//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);
         ZEDOAPIStub.CreativeHtmlInput bean = new ZEDOAPIStub.CreativeHtmlInput();
         
         ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[4];
         cp[0] = new ZEDOAPIStub.CreativeProperty();
         cp[0].setAttribute("BANDWIDTH");
         cp[0].setValue("off");
         cp[2] = new ZEDOAPIStub.CreativeProperty();
         cp[2].setAttribute("TARGET_WINDOW");
         cp[2].setValue("_blank");
         cp[1] = new ZEDOAPIStub.CreativeProperty();
         cp[1].setAttribute("EasyClickCheck");
         cp[1].setValue("off");
         cp[3] = new ZEDOAPIStub.CreativeProperty();
         cp[3].setAttribute("EasyClickURL1");
         cp[3].setValue("http://www.google.com");
         bean.setCreativePropertiesNecessary(cp);

         ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
         cpa.setAttribute("HTML_TYPE");
         cpa.setValue("Input");
         bean.addCreativePropertiesNecessary(cpa);

         ZEDOAPIStub.CreativeProperty tmp = new ZEDOAPIStub.CreativeProperty();
         tmp.setAttribute("TEMPLATE");
         tmp.setValue("paste html templte here");
         bean.addCreativePropertiesNecessary(tmp);

         cc.setCreativeHtmlInput(bean);

         ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
         param.setCreative(cc);
         Thread.sleep(1000);
         ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
         System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!");
         System.out.println(cccr.get_return().getCreativeName()+" "+cccr.get_return().getId());

      } catch (Exception e) {
            System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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();
            }
        }
    }

    private static byte[] getFile(String name) {
        try {

             java.io.FileInputStream fis = new java.io.FileInputStream(name);
             byte[] body = new byte[fis.available()];
             fis.read(body);
             return body;

            } catch (FileNotFoundException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            } catch (IOException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            }
            return new byte[0];
    }
}

HTML Upload

/* Sample Code To Create HTML Upload type Creative */
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import com.zedo.zapi.ZEDOAPIStub;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreativeTest();
    }

    private static void createCreativeTest() {
      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);

         ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
         cc.setCreativeName("Creative_HTML_upload");
         cc.setCampaignId(694801);
         cc.setCreativeType("HTML TYPEUpload");
         cc.setStatus("APP");
         cc.setClickThroughUrl("http://");
         cc.setAltText("Test_1");
         cc.setImpressionsAllocated(-1);

         ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
         cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
         cct[0].setChannelId(400460);
         cct[0].setStatus("A");
         cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
         cct[1].setChannelId(602025);
         cct[1].setStatus("A");
         cc.setChannelTargeting(cct);

         ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
         cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
         cgt[0].setGeoId(480);        
         cgt[0].setStatus("A");
         cc.setGeoTargeting(cgt);
         cc.setGeoType("State");

         ZEDOAPIStub.CreativeFrequencyCap[] cfc = new ZEDOAPIStub.CreativeFrequencyCap[1];
         cfc[0] = new ZEDOAPIStub.CreativeFrequencyCap();
         cfc[0].setFreqCapType(1);
         cfc[0].setCap(12);              
         cfc[0].setDuration(5);         
         cfc[0].setDurationType(2);      
         cfc[0].setStatus("A");
         cc.setCreativeFrequencyCaps(cfc);


//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);
         ZEDOAPIStub.CreativeHtmlUpload bean = new ZEDOAPIStub.CreativeHtmlUpload();

         bean.setHtmlFileName("index.html");

                 ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[4];
         cp[0] = new ZEDOAPIStub.CreativeProperty();
         cp[0].setAttribute("BANDWIDTH");
         cp[0].setValue("off");
         cp[2] = new ZEDOAPIStub.CreativeProperty();
         cp[2].setAttribute("TARGET_WINDOW");
         cp[2].setValue("_blank");
         cp[1] = new ZEDOAPIStub.CreativeProperty();
         cp[1].setAttribute("EasyClickCheck");
         cp[1].setValue("off");
         cp[3] = new ZEDOAPIStub.CreativeProperty();
         cp[3].setAttribute("EasyClickURL1");
         cp[3].setValue("http://www.google.com");
         bean.setCreativePropertiesNecessary(cp);

         ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
         cpa.setAttribute("HTML_TYPE");
         cpa.setValue("Upload");
         bean.addCreativePropertiesNecessary(cpa);

         ZEDOAPIStub.CreativeProperty hf = new ZEDOAPIStub.CreativeProperty();
         hf.setAttribute("HTML_FILE");
         hf.setValue(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("\index.html"))));
         bean.addCreativePropertiesNecessary(hf);

         cc.setCreativeHtmlUpload(bean);

         ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
         param.setCreative(cc);
         Thread.sleep(1000);
         ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
         System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!");
         System.out.println(cccr.get_return().getCreativeName()+" "+cccr.get_return().getId());

      } catch (Exception e) {
            System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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();
            }
        }
    }

    private static byte[] getFile(String name) {
        try {

             java.io.FileInputStream fis = new java.io.FileInputStream(name);
             byte[] body = new byte[fis.available()];
             fis.read(body);
             return body;

            } catch (FileNotFoundException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            } catch (IOException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            }
            return new byte[0];
    }
}

POP

/*This Template shows Sample Code To Create POP type Creative */
import com.zedo.zapi.ZEDOAPIStub;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreative();
    }

    private static void createCreative() {
      System.out.println(3);
      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);

        ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
        cc.setCreativeName("creative_PopUp");
        cc.setCampaignId(694801);
        cc.setCreativeType("POP TYPE FILE");
        cc.setStatus("APP");
        cc.setClickThroughUrl("http://www.drive-more-leads.com/zedo");
        cc.setAltText("Test_1");

        ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
        cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[0].setChannelId(400460);
        cct[0].setStatus("A");
        cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[1].setChannelId(602025);
        cct[1].setStatus("A");
        cc.setChannelTargeting(cct);

        ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
        cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
        cgt[0].setGeoId(1);
        cgt[0].setStatus("A");
        cc.setGeoTargeting(cgt);
        cc.setGeoType("NONE");

//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);

        ZEDOAPIStub.CreativePopUpFile bean = new ZEDOAPIStub.CreativePopUpFile();
        bean.setBackupFileName("test.jpg");
        bean.setBackupFileBody(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("test.jpg"))));
        bean.setPopUpFileName("demo.flv");

        ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[4];
        cp[0] = new ZEDOAPIStub.CreativeProperty();
        cp[0].setAttribute("BANDWIDTH");
        cp[0].setValue("off");
        cp[1] = new ZEDOAPIStub.CreativeProperty();
        cp[1].setAttribute("TARGET_WINDOW");
        cp[1].setValue("_blank");
        cp[2] = new ZEDOAPIStub.CreativeProperty();
        cp[2].setAttribute("POP_FOCUS");
        cp[2].setValue("OVER");
        cp[3] = new ZEDOAPIStub.CreativeProperty();
        cp[3].setAttribute("POP_TYPE");
        cp[3].setValue("FILE");    
        bean.setCreativePropertiesNecessary(cp);

        ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
        cpa.setAttribute("POP_FILE");
        cpa.setValue(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("demo.flv"))));
        bean.addCreativePropertiesNecessary(cpa);
        cc.setCreativePopUpFile(bean);

        ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
        param.setCreative(cc);
        Thread.sleep(1000);
        ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
        System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!");
        System.out.println("PLEASE: " + cccr.get_return().getCreativeName() + " " + cccr.get_return().getId());

        } catch (Exception e) {
             System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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();
             }
        }
    }

    private static byte[] getFile(String name) {
        try {

             java.io.FileInputStream fis = new java.io.FileInputStream(name);
             byte[] body = new byte[fis.available()];
             fis.read(body);
             return body;

            } catch (FileNotFoundException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            } catch (IOException e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
            }
            return new byte[0];
    }
}

Rich Media

/*This Template shows Sample Code To Create Rich Media Type Creative */
import com.zedo.zapi.ZEDOAPIStub;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreative();
    }

    private static void createCreative() {
      System.out.println(3);
      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);

        ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
        cc.setCreativeName("Creative_RM_Overlay");
        cc.setCampaignId(694801);
        cc.setCreativeType("Rich Media Overlay");
        cc.setStatus("APP");
        cc.setClickThroughUrl("http://www.drive-more-leads.com/zedo");
        cc.setAltText("Testing Rich Media Overlay");

        ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
        cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[0].setChannelId(400460);
        cct[0].setStatus("A");
        cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[1].setChannelId(602025);
        cct[1].setStatus("A");
        cc.setChannelTargeting(cct);

        ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
        cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
        cgt[0].setGeoId(1);
        cgt[0].setStatus("A");
        cc.setGeoTargeting(cgt);
        cc.setGeoType("NONE");

//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);

/*********** Code to configure Creative Type Bean ***********/
        ZEDOAPIStub.CreativeRichMediaOverlay bean = new ZEDOAPIStub.CreativeRichMediaOverlay();
        bean.setBackupFileName("test.jpg");
        bean.setBackupFileBody(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("/test.jpg"))));
        bean.setFloatFlashFileName("test2.flv");
        bean.setBaseFlashFileName("test1.swf");
                ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[2];
        cp[0] = new ZEDOAPIStub.CreativeProperty();
        cp[0].setAttribute("BANDWIDTH");
        cp[0].setValue("off");
        cp[1] = new ZEDOAPIStub.CreativeProperty();
        cp[1].setAttribute("TARGET_WINDOW");
        cp[1].setValue("_blank");
        bean.setCreativePropertiesNecessary(cp);

        ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
        cpa.setAttribute("RICH_MEDIA_TYPE");
        cpa.setValue("OVERLAY");
        bean.addCreativePropertiesNecessary(cpa);

        ZEDOAPIStub.CreativeProperty url = new ZEDOAPIStub.CreativeProperty();
        url.setAttribute("RM_BASE_CLICK_URL");
        url.setValue("http://www.google.com");
        bean.addCreativePropertiesNecessary(url);

        ZEDOAPIStub.CreativeProperty hf = new ZEDOAPIStub.CreativeProperty();
        hf.setAttribute("RM_BASE_FLASH_FILE");
        hf.setValue(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("/test1.swf"))));
        bean.addCreativePropertiesNecessary(hf);

        ZEDOAPIStub.CreativeProperty reb = new ZEDOAPIStub.CreativeProperty();
        reb.setAttribute("RM_ENABLE_BASE");
        reb.setValue("true");
        bean.addCreativePropertiesNecessary(reb);

        ZEDOAPIStub.CreativeProperty flt = new ZEDOAPIStub.CreativeProperty();
        flt.setAttribute("RM_FLOAT_CLICK_URL");
        flt.setValue("http://www.gmail.com");
        bean.addCreativePropertiesNecessary(flt);

        ZEDOAPIStub.CreativeProperty clt = new ZEDOAPIStub.CreativeProperty();
        clt.setAttribute("RM_FLOAT_CLOSE_TIME");
        clt.setValue("10");
        bean.addCreativePropertiesNecessary(clt);

        ZEDOAPIStub.CreativeProperty p1 = new ZEDOAPIStub.CreativeProperty();
        p1.setAttribute("RM_FLOAT_DURATION");
        p1.setValue("10");
        bean.addCreativePropertiesNecessary(p1);

        ZEDOAPIStub.CreativeProperty p2 = new ZEDOAPIStub.CreativeProperty();
        p2.setAttribute("RM_FLOAT_EXPAND_TIME");
        p2.setValue("10");
        bean.addCreativePropertiesNecessary(p2);

        ZEDOAPIStub.CreativeProperty p3 = new ZEDOAPIStub.CreativeProperty();
        p3.setAttribute("RM_FLOAT_FLASH_FILE");
        p3.setValue(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("/test2.swf"))));
        bean.addCreativePropertiesNecessary(p3);

        ZEDOAPIStub.CreativeProperty p6 = new ZEDOAPIStub.CreativeProperty();
        p6.setAttribute("RM_FLOAT_HEIGHT");
        p6.setValue("20");
        bean.addCreativePropertiesNecessary(p6);

        ZEDOAPIStub.CreativeProperty p7 = new ZEDOAPIStub.CreativeProperty();
        p7.setAttribute("RM_FLOAT_ONLOAD");
        p7.setValue("true");
        bean.addCreativePropertiesNecessary(p7);

        ZEDOAPIStub.CreativeProperty p8 = new ZEDOAPIStub.CreativeProperty();
        p8.setAttribute("RM_FLOAT_WIDTH");
        p8.setValue("20");
        bean.addCreativePropertiesNecessary(p8);

        //The Creative Bean Object should be set as shown below. 
        cc.setCreativeRichMediaOverlay(bean);
/********** Creative Type Bean Ends**********/

        ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
        param.setCreative(cc);
        Thread.sleep(1000);
        ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
        System.out.println("CREATE_CREATIVE COMPLETE!");
        System.out.println(cccr.get_return().getCreativeName()+" "+cccr.get_return().getId());

      } catch (Exception e) {
           System.err.println("ERROR: CREATE_CREATIVE 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();
           }
      }
    }

    private static byte[] getFile(String name) {
      try {
         java.io.FileInputStream fis = new java.io.FileInputStream(name);
         byte[] body = new byte[fis.available()];
         fis.read(body);
         return body;
      } catch (FileNotFoundException e) {
         System.err.println(e.getMessage());
         e.printStackTrace();
      } catch (IOException e) {
         System.err.println(e.getMessage());
         e.printStackTrace();
      }
      return new byte[0];
    }
}

Slider Standard Banner

/*This Template shows Sample Code To Create Slider Std Banner type Creative */
import com.zedo.zapi.ZEDOAPIStub;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreative();
    }

    private static void createCreative() {
      System.out.println(3);
      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);

        ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
        cc.setCreativeName("creative_Slider_AdTag_001");
        cc.setCampaignId(795661);
        cc.setCreativeType("Slider Std Banner");
        cc.setStatus("APP");
        cc.setAltText("Test_1");
        cc.setImpressionsAllocated(-1);

        ZEDOAPIStub.CreativeChannelSetTargeting[] ccst = new ZEDOAPIStub.CreativeChannelSetTargeting[1];
        ccst[0]= new ZEDOAPIStub.CreativeChannelSetTargeting();
        ccst[0].setChannelSetId(4970);
        ccst[0].setStatus("A");
        cc.setChannelSetTargeting(ccst);

        ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
        cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[0].setChannelId(918415);
        cct[0].setStatus("A");
        cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[1].setChannelId(918413);
        cct[1].setStatus("A");
        cc.setChannelTargeting(cct);

        ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
        cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
        cgt[0].setGeoId(1);
        cgt[0].setStatus("A");
        cc.setGeoTargeting(cgt);
        cc.setGeoType("NONE");

//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);

/*********** Code to configure Creative Type Bean ***********/
     ZEDOAPIStub.CreativeSliderStdBanner bean = new ZEDOAPIStub.CreativeSliderStdBanner();

               ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[2];
                        cp[0] = new ZEDOAPIStub.CreativeProperty();
                        cp[0].setAttribute("BANDWIDTH");
                        cp[0].setValue("off");
                        cp[1] = new ZEDOAPIStub.CreativeProperty();
                        cp[1].setAttribute("TARGET_WINDOW");
                        cp[1].setValue("_blank");
                        bean.setCreativePropertiesNecessary(cp);

                        ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
                        cpa.setAttribute("SLIDER_POSITION");
                        cpa.setValue("right");
                        bean.addCreativePropertiesNecessary(cpa);

                        ZEDOAPIStub.CreativeProperty url = new ZEDOAPIStub.CreativeProperty();
                        url.setAttribute("SLIDER_HEIGHT");
                        url.setValue("235");
                        bean.addCreativePropertiesNecessary(url);

                        ZEDOAPIStub.CreativeProperty hf = new ZEDOAPIStub.CreativeProperty();
                        hf.setAttribute("SLIDER_WIDTH");
                        hf.setValue("89");
                        bean.addCreativePropertiesNecessary(hf);

                        ZEDOAPIStub.CreativeProperty flt_ = new ZEDOAPIStub.CreativeProperty();
                         flt_.setAttribute("SLIDER_IMAGE_HREF");
                         flt_.setValue("http://www.google.com");
                             bean.addCreativePropertiesNecessary(flt_);
                
                        
                        ZEDOAPIStub.CreativeProperty flt1 = new ZEDOAPIStub.CreativeProperty();
                        flt1.setAttribute("SLIDER_BAR");
                        flt1.setValue("#CCCC7R");
                        bean.addCreativePropertiesNecessary(flt1);

                        
                        ZEDOAPIStub.CreativeProperty flt2 = new ZEDOAPIStub.CreativeProperty();
                        flt2.setAttribute("EasyClickCheck");
                        flt2.setValue("off");
                        bean.addCreativePropertiesNecessary(flt2);

                        
                        ZEDOAPIStub.CreativeProperty flt3 = new ZEDOAPIStub.CreativeProperty();
                        flt3.setAttribute("SLIDER_TYPE");
                        flt3.setValue("SLIDER_IMAGE");
                        bean.addCreativePropertiesNecessary(flt3);
                        
                        ZEDOAPIStub.CreativeProperty flt4 = new ZEDOAPIStub.CreativeProperty();
                        flt4.setAttribute("FLASH_TYPE");
                        flt4.setValue("SLIDER_IMAGE");
                        bean.addCreativePropertiesNecessary(flt4);

                        bean.setBackupFileName("name of the file with ext");
                bean.setBackupFileBody(new String(org.apache.commons.codec.binary.Base64.encodeBase64(getFile("file path"))));
                
                        

                        //The Creative Bean Object should be set as shown below.
                         
                        cc.setCreativeSliderStdBanner(bean);
                        
                /********** Creative Type Bean Ends**********/
     
        ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
        param.setCreative(cc);
        Thread.sleep(1000);
        ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
        System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!");
        System.out.println("PLEASE: " + cccr.get_return().getCreativeName() + " " + cccr.get_return().getId());

     } catch (Exception e) {
            System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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();
            }
        }
    }

    private static byte[] getFile(String name) {
        try {
            java.io.FileInputStream fis = new java.io.FileInputStream(name);
            byte[] body = new byte[fis.available()];
            fis.read(body);
            return body;
        } catch (FileNotFoundException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        } catch (IOException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        }
        return new byte[0];
    }
}

Slider Ad Tag

/*This Template shows Sample Code To Create Slider AdTag type Creative */
import com.zedo.zapi.ZEDOAPIStub;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import java.io.FileNotFoundException;
import java.io.IOException;

public class CreateCreativeTest {

    public static void main(String[] args) {
        CreateCreativeTest.createCreative();
    }

    private static void createCreative() {
      System.out.println(3);
      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);

        ZEDOAPIStub.CreativeCommon cc = new ZEDOAPIStub.CreativeCommon();
        cc.setCreativeName("creative_Slider_AdTag_001");
        cc.setCampaignId(795661);
        cc.setCreativeType("Slider Ad Tag");
        cc.setStatus("APP");
        cc.setAltText("Test_1");
        cc.setImpressionsAllocated(-1);

        ZEDOAPIStub.CreativeChannelSetTargeting[] ccst = new ZEDOAPIStub.CreativeChannelSetTargeting[1];
        ccst[0]= new ZEDOAPIStub.CreativeChannelSetTargeting();
        ccst[0].setChannelSetId(4970);
        ccst[0].setStatus("A");
        cc.setChannelSetTargeting(ccst);

        ZEDOAPIStub.CreativeChannelTargeting[] cct = new ZEDOAPIStub.CreativeChannelTargeting[2];
        cct[0]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[0].setChannelId(918415);
        cct[0].setStatus("A");
        cct[1]= new ZEDOAPIStub.CreativeChannelTargeting();
        cct[1].setChannelId(918413);
        cct[1].setStatus("A");
        cc.setChannelTargeting(cct);

        ZEDOAPIStub.CreativeGeoTargeting[] cgt = new ZEDOAPIStub.CreativeGeoTargeting[1];
        cgt[0] = new ZEDOAPIStub.CreativeGeoTargeting();
        cgt[0].setGeoId(1);
        cgt[0].setStatus("A");
        cc.setGeoTargeting(cgt);
        cc.setGeoType("NONE");

//CustomTargeting
ZEDOAPIStub.CreativeCustomTargeting[] aa= new ZEDOAPIStub.CreativeCustomTargeting[3];
 
 aa[0]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[0].setKey("Interest");
 aa[0].setLogic("NO OPERATOR");
 aa[0].setStatus("A");
 aa[0].setOperator("1");
 String[] words = {"sports","Singing","music"}; 
 aa[0].setValues(words);
 
 
 aa[1]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[1].setKey("Branch");
 aa[1].setLogic("AND");
 aa[1].setStatus("A");
 aa[1].setOperator("2");
 String[] words1= {"Banglore","Panjim", "goa"};
 aa[1].setValues(words1);
 
 
 aa[2]= new ZEDOAPIStub.CreativeCustomTargeting();
 aa[2].setKey("date");;
 aa[2].setLogic("OR");
 aa[2].setStatus("A");
 aa[2].setOperator("15");
 String[] words2={"12/06/1874"};
 aa[2].setValues(words2);
 
 cc.setCustomTargeting(aa);

/*********** Code to configure Creative Type Bean ***********/
        ZEDOAPIStub.CreativeSliderAdTag bean = new ZEDOAPIStub.CreativeSliderAdTag();

        ZEDOAPIStub.CreativeProperty[] cp = new ZEDOAPIStub.CreativeProperty[2];
                        cp[0] = new ZEDOAPIStub.CreativeProperty();
                        cp[0].setAttribute("BANDWIDTH");
                        cp[0].setValue("off");
                        cp[1] = new ZEDOAPIStub.CreativeProperty();
                        cp[1].setAttribute("TARGET_WINDOW");
                        cp[1].setValue("_blank");
                        bean.setCreativePropertiesNecessary(cp);

                        ZEDOAPIStub.CreativeProperty cpa = new ZEDOAPIStub.CreativeProperty();
                        cpa.setAttribute("SLIDER_POSITION");
                        cpa.setValue("right");
                        bean.addCreativePropertiesNecessary(cpa);

                        ZEDOAPIStub.CreativeProperty url = new ZEDOAPIStub.CreativeProperty();
                        url.setAttribute("SLIDER_HEIGHT");
                        url.setValue("235");
                        bean.addCreativePropertiesNecessary(url);

                        ZEDOAPIStub.CreativeProperty hf = new ZEDOAPIStub.CreativeProperty();
                        hf.setAttribute("SLIDER_WIDTH");
                        hf.setValue("89");
                        bean.addCreativePropertiesNecessary(hf);

                       
                        ZEDOAPIStub.CreativeProperty flt = new ZEDOAPIStub.CreativeProperty();
                        flt.setAttribute("TEMPLATE");
                        flt.setValue("paste your template here");
                        bean.addCreativePropertiesNecessary(flt);

                        
                        ZEDOAPIStub.CreativeProperty flt1 = new ZEDOAPIStub.CreativeProperty();
                        flt1.setAttribute("SLIDER_BAR");
                        flt1.setValue("#CCCC7R");
                        bean.addCreativePropertiesNecessary(flt1);

                        
                        ZEDOAPIStub.CreativeProperty flt2 = new ZEDOAPIStub.CreativeProperty();
                        flt2.setAttribute("EasyClickCheck");
                        flt2.setValue("off");
                        bean.addCreativePropertiesNecessary(flt2);

                        
                        ZEDOAPIStub.CreativeProperty flt3 = new ZEDOAPIStub.CreativeProperty();
                        flt3.setAttribute("SLIDER_TYPE");
                        flt3.setValue("SLIDER_HTML");
                        bean.addCreativePropertiesNecessary(flt3);
                        
                        ZEDOAPIStub.CreativeProperty flt4 = new ZEDOAPIStub.CreativeProperty();
                        flt4.setAttribute("HTML_TYPE");
                        flt4.setValue("Input");
                        bean.addCreativePropertiesNecessary(flt4);


                        

                        //The Creative Bean Object should be set as shown below.
                         
                        cc.setCreativeSliderAdTag(bean);
                        
                /********** Creative Type Bean Ends**********/
     
        ZEDOAPIStub.CreateCreative param = new ZEDOAPIStub.CreateCreative();
        param.setCreative(cc);
        Thread.sleep(1000);
        ZEDOAPIStub.CreateCreativeResponse cccr = stub.createCreative(param);
        System.out.println("CREATE_CREATIVE_COMPLETE COMPLETE!");
        System.out.println("PLEASE: " + cccr.get_return().getCreativeName() + " " + cccr.get_return().getId());

     } catch (Exception e) {
            System.err.println("ERROR: CREATE_CREATIVE_COMPLETE 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();
            }
        }
    }

    private static byte[] getFile(String name) {
        try {
            java.io.FileInputStream fis = new java.io.FileInputStream(name);
            byte[] body = new byte[fis.available()];
            fis.read(body);
            return body;
        } catch (FileNotFoundException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        } catch (IOException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        }
        return new byte[0];
    }
}

 

PHP

Ads in Flash

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreative";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://www.zedo.com";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350041;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
$tag=Array();
 $tag[0]=new Tag();
 $tag[0]->name="tag1";
 $tag[0]->value="value1";
 $tag[1]=new Tag();
 $tag[1]->name="tag2";
 $tag[1]->value="value2";
 $creativeCommon->tags=$tag;
        //Setting Creative Type
        $creativeCommon->creativeType="Ad Flash Std Banner";
        $creativeAdInFlashStdBanner = new CreativeAdInFlashStdBanner();
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("IN_FLASH_TYPE", "IN_STD_BANNER");
        $creativePropertiesNecessary[1] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[2] = new CreativeProperty("IN_FLASH_CLICK", "http://www.google.com");
        $creativeAdInFlashStdBanner->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativePropertiesAdditional = Array();
        $creativePropertiesAdditional[0] = new CreativeProperty("IN_FLASH_IMG_URL", "http://www.allbestwallpapers.com/vehicle/toyota.gif");
        $creativeAdInFlashStdBanner->creativePropertiesAdditional=$creativePropertiesAdditional;
        $creativeCommon->creativeAdInFlashStdBanner=$creativeAdInFlashStdBanner;
        
        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
          var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

HTML Input

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreativeHtmlInput";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


        //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
        //Setting Creative Type
        $creativeCommon->creativeType="HTML TYPEInput";
        $creativeHtmlInput = new CreativeHtmlInput();
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("HTML_TYPE", "Input");
        $creativePropertiesNecessary[1] = new CreativeProperty("TEMPLATE", "paste html template here");
        $creativePropertiesNecessary[2] = new CreativeProperty("BANDWIDTH", "broadband");
        $creativePropertiesNecessary[3] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[4] = new CreativeProperty("EasyClickCheck", "off");
        $creativePropertiesNecessary[5] = new CreativeProperty("EasyClickURL1", "http://www.google.com");
        $creativeHtmlInput->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativeHtmlInput=$creativeHtmlInput;
        
        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
           var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
                echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

HTML Upload

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreativeHtmlUpload";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
        //Setting Creative Type
        $creativeCommon->creativeType="HTML TYPEUpload";
        $creativeHtmlUpload = new CreativeHtmlUpload(); 
        $creativeHtmlUpload->htmlFileName="test.html";
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("HTML_TYPE", "Upload");
        $creativePropertiesNecessary[1] = new CreativeProperty("HTML_FILE", base64_encode(file_get_contents("assets/test.html")));
        $creativePropertiesNecessary[2] = new CreativeProperty("BANDWIDTH", "off");
        $creativePropertiesNecessary[3] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[4] = new CreativeProperty("EasyClickCheck", "off");
        $creativePropertiesNecessary[5] = new CreativeProperty("EasyClickURL1", "http://www.zedo.com");
        $creativeHtmlUpload->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativeHtmlUpload=$creativeHtmlUpload;
        
        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        } ccatch (SoapFault $ex) {
         var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
                echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

POP

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreativeForChange";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://www.zedo.com";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="TestCreativePop";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';
        

 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        //Setting Creative Type
        $creativeCommon->creativeType="POP TYPE FILE";
        $creativePopUpFile = new CreativePopUpFile();
        $creativePopUpFile->backupFileName="img.jpg";
        $creativePopUpFile->backupFileBody=base64_encode(file_get_contents("assets/img.jpg"));
        $creativePopUpFile->backupFilePath=null;
        $creativePopUpFile->popUpFileName="test.flv";
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("POP_FOCUS", "OVER");
        $creativePropertiesNecessary[1] = new CreativeProperty("POP_FILE", base64_encode(file_get_contents("assets/test.swf")));
        $creativePropertiesNecessary[2] = new CreativeProperty("BANDWIDTH", "off");
        $creativePropertiesNecessary[3] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[4] = new CreativeProperty("POP_TYPE", "FILE");
        $creativePopUpFile->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativePopUpFile=$creativePopUpFile;
        
        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
          var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

Rich Media

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreativeRichMedia";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://www.zedo.com";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
        //Setting Creative Type
        $creativeCommon->creativeType="Rich Media Overlay";
        $creativeRichMediaOverlay = new CreativeRichMediaOverlay();     
        $creativeRichMediaOverlay->backupFileName="img.jpg";
        $creativeRichMediaOverlay->backupFileBody=base64_encode(file_get_contents("assets/img.jpg"));
        $creativeRichMediaOverlay->backupFilePath=null;
        $creativeRichMediaOverlay->floatFlashFileName="test.flv";
        $creativeRichMediaOverlay->baseFlashFileName="test.swf";
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("RICH_MEDIA_TYPE", "OVERLAY");
        $creativePropertiesNecessary[1] = new CreativeProperty("RM_FLOAT_WIDTH", "20");
        $creativePropertiesNecessary[2] = new CreativeProperty("BANDWIDTH", "off");
        $creativePropertiesNecessary[3] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[4] = new CreativeProperty("RM_BASE_CLICK_URL", "http://www.google.com");
        $creativePropertiesNecessary[5] = new CreativeProperty("RM_BASE_FLASH_FILE", base64_encode(file_get_contents("assets/test.swf")));
        $creativePropertiesNecessary[6] = new CreativeProperty("RM_ENABLE_BASE", "true");
        $creativePropertiesNecessary[7] = new CreativeProperty("RM_FLOAT_CLICK_URL", "http://www.gmail.com");
        $creativePropertiesNecessary[8] = new CreativeProperty("RM_FLOAT_CLOSE_TIME", "10");
        $creativePropertiesNecessary[9] = new CreativeProperty("RM_FLOAT_DURATION", "10");
        $creativePropertiesNecessary[10] = new CreativeProperty("RM_FLOAT_EXPAND_TIME", "0");
        $creativePropertiesNecessary[11] = new CreativeProperty("RM_FLOAT_FLASH_FILE", base64_encode(file_get_contents("assets/test.swf")));
        $creativePropertiesNecessary[12] = new CreativeProperty("RM_FLOAT_HEIGHT", "20");
        $creativePropertiesNecessary[13] = new CreativeProperty("RM_FLOAT_ONLOAD", "true");
        $creativeRichMediaOverlay->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativeRichMediaOverlay=$creativeRichMediaOverlay;
        
        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
           var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
                echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

Slider Standard Banner

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreativeSliderStdBanner";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://www.zedo.com";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
                
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
        //Setting Creative Type
        $creativeCommon->creativeType="Slider Std Banner";
        $creativeSliderStdBanner = new CreativeSliderStdBanner();
        $creativeSliderStdBanner->backupFileName="img.jpg";
        $creativeSliderStdBanner->backupFileBody=base64_encode(file_get_contents("assets/img.jpg"));
        $creativeSliderStdBanner->backupFilePath=null;
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("BANDWIDTH", "off");
        $creativePropertiesNecessary[1] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[2] = new CreativeProperty("SLIDER_POSITION", "bottom right");
        $creativePropertiesNecessary[3] = new CreativeProperty("SLIDER_HEIGHT", "235");
        $creativePropertiesNecessary[4] = new CreativeProperty("SLIDER_WIDTH", "89");
        $creativePropertiesNecessary[5] = new CreativeProperty("SLIDER_IMAGE_HREF", "http://www.google.com");
        $creativePropertiesNecessary[6] = new CreativeProperty("SLIDER_BAR", "#CCCC7R");
        $creativePropertiesNecessary[7] = new CreativeProperty("EasyClickCheck", "off");
        $creativePropertiesNecessary[8] = new CreativeProperty("SLIDER_TYPE", "SLIDER_IMAGE");
        $creativePropertiesNecessary[9] = new CreativeProperty("FLASH_TYPE", "SLIDER_IMAGE");
        $creativeSliderStdBanner->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativeSliderStdBanner=$creativeSliderStdBanner;

        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
           var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
                echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

Slider Ad Tag

        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 
         */
        $creativeCommon = new CreativeCommon();
        
        $creativeCommon->creativeName="TestCreative";
        $creativeCommon->campaignId=1350191;
        $creativeCommon->clickThroughUrl="http://www.zedo.com";
        
        $creativeFrequencyCaps = Array();
        $creativeFrequencyCaps[0] = new CreativeFrequencyCap();
        $creativeFrequencyCaps[0]->cap=7;
        $creativeFrequencyCaps[0]->duration=5;
        $creativeFrequencyCaps[0]->durationType=3;
        $creativeFrequencyCaps[0]->freqCapType=1;
        $creativeFrequencyCaps[0]->status="A";
        $creativeCommon->creativeFrequencyCaps=$creativeFrequencyCaps;
        
        $creativeCommon->altText="Test";
        $creativeCommon->dimensionId=0;
        $creativeCommon->frequency=0;
        $creativeCommon->status='APP';
        $creativeCommon->profileType=0;
        $creativeCommon->allocateByDay=null;
        
        $creativeCommon->impressionsAllocated=100000;
        $creativeCommon->actionsAllocated=0;
        $creativeCommon->clicksAllocated=0;

        //$creativeCommon->additionalFile=null;
        //$creativeCommon->attributes=null;
        //$creativeCommon->bandwidth=null;
        //$creativeCommon->browserFlag=null;
        
        //Set Targeting
        $channelTargeting = Array();
        $channelTargeting[0] = new CreativeChannelTargeting();
        $channelTargeting[0]->channelId=1350192;
        $channelTargeting[0]->status="A";
        $creativeCommon->channelTargeting=$channelTargeting;
        $geoTargeting = Array();
        $geoTargeting[0] = new CreativeGeoTargeting();
        $geoTargeting[0]->geoId=173;
        $geoTargeting[0]->status="A";
        $creativeCommon->geoTargeting=$geoTargeting;
        
        $creativeCommon->geoPriority=0;
        $creativeCommon->geoType='Country';


 //CustomTargeting
 $creativeCustomTargeting = Array();
 $creativeCustomTargeting[0]= new CreativeCustomTargeting();
 $creativeCustomTargeting[0]->key="Interest";
 $creativeCustomTargeting[0]-> logic="NO operator";
 $creativeCustomTargeting[0]-> status="A";
 $creativeCustomTargeting[0]-> operator="1";
 $words = Array();
 $words[0] = "sports";
 $words[1]="Singing";
 $words[2]="music"; 
 $creativeCustomTargeting[0]-> values=$words;
 
 
 $creativeCustomTargeting[1]= new CreativeCustomTargeting();
 $creativeCustomTargeting[1]-> key="Branch";
 $creativeCustomTargeting[1]-> logic="AND";
 $creativeCustomTargeting[1]-> status="A";
 $creativeCustomTargeting[1]-> operator="2";
 $words1 = Array();
 $words1[0] = "Banglore";
 $words1[1]="Panjim";
 $words1[2]="goa"; 
 $creativeCustomTargeting[1]-> values=$words1;
 
 
 $creativeCustomTargeting[2]= new CreativeCustomTargeting();
 $creativeCustomTargeting[2]-> key="date";
 $creativeCustomTargeting[2]-> logic="OR";
 $creativeCustomTargeting[2]-> status="A";
 $creativeCustomTargeting[2]-> operator="15";
 $words2 = Array();
 $words2[0]="12/06/1874";
 $creativeCustomTargeting[2]-> values=$words2;
 
 $creativeCommon->customTargeting=$creativeCustomTargeting;
        
        //Setting Creative Type
        $creativeCommon->creativeType="Slider Ad Tag";
        $creativeSliderAdTag = new CreativeSliderAdTag();
        $creativeSliderAdTag->backupFileName="img.jpg";
        $creativeSliderAdTag->backupFileBody=base64_encode(file_get_contents("assets/img.jpg"));
        $creativeSliderAdTag->backupFilePath=null;
        $creativePropertiesNecessary = Array();
        $creativePropertiesNecessary[0] = new CreativeProperty("BANDWIDTH", "off");
        $creativePropertiesNecessary[1] = new CreativeProperty("TARGET_WINDOW", "_blank");
        $creativePropertiesNecessary[2] = new CreativeProperty("SLIDER_POSITION", "bottom left");
        $creativePropertiesNecessary[3] = new CreativeProperty("SLIDER_HEIGHT", "235");
        $creativePropertiesNecessary[4] = new CreativeProperty("SLIDER_WIDTH", "89");
        $creativePropertiesNecessary[5] = new CreativeProperty("TEMPLATE", "paste your template here");
        $creativePropertiesNecessary[6] = new CreativeProperty("SLIDER_BAR", "#CCCC7R");
        $creativePropertiesNecessary[7] = new CreativeProperty("EasyClickCheck", "off");
        $creativePropertiesNecessary[8] = new CreativeProperty("SLIDER_TYPE", "SLIDER_HTML");
        $creativePropertiesNecessary[9] = new CreativeProperty("HTML_TYPE", "Input");
        $creativeSliderAdTag->creativePropertiesNecessary=$creativePropertiesNecessary;
        $creativeCommon->creativeSliderAdTag=$creativeSliderAdTag;

        $param = new createCreative($creativeCommon);
        
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->createCreative($param);
        }catch (SoapFault $ex) {
          var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "CREATE CREATIVE FAILED\n";
            die();
        }
        
        /**
         * Response
         */
                echo "CREATE CREATIVE COMPLETE\n\n";
        echo "\nReponse:\n";
        echo $stub->__getLastResponse();

 

SOAP

Request

POST /axis2/services/ZEDOAPI?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:createCreative"
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">example</zedoapi:password>
<zedoapi:network xmlns:zedoapi="http://api.zedo.com">525</zedoapi:network> 
</soapenv:Header> 
<soapenv:Body> 
<ns5:createCreative xmlns:ns5="http://zapi.zedo.com"> 
<ns5:creative> 
<ns1:altText xmlns:ns1="http://client.api.zedo.com/xsd">Test_1</ns1:altText> 
<ns1:campaignId xmlns:ns1="http://client.api.zedo.com/xsd">1171329</ns1:campaignId>
<channelTargeting xmlns="http://client.api.zedo.com/xsd">
<channelId>634197</channelId>
<status>A</status>
</channelTargeting>
<ns1:clickThroughUrl xmlns:ns1="http://client.api.zedo.com/xsd">
</ns1:clickThroughUrl>
<creativeFrequencyCaps xmlns="http://client.api.zedo.com/xsd">
<cap>12</cap>
<duration>5</duration>
<durationType>2</durationType>
<freqCapType>1</freqCapType>
<status>A</status>
</creativeFrequencyCaps>
<creativeHtmlInput xmlns="http://client.api.zedo.com/xsd">
<creativePropertiesNecessary>
<attribute>BANDWIDTH</attribute>
<value>off</value>
</creativePropertiesNecessary>
<creativePropertiesNecessary>
<attribute>EasyClickCheck</attribute>
<value>off</value>
</creativePropertiesNecessary>
<creativePropertiesNecessary>
<attribute>TARGET_WINDOW</attribute>
<value>_blank</value>
</creativePropertiesNecessary>
<creativePropertiesNecessary>
<attribute>EasyClickURL1</attribute>
<value>http://www.google.com</value>
</creativePropertiesNecessary>
<creativePropertiesNecessary>
<attribute>HTML_TYPE</attribute>
<value>Input</value>
</creativePropertiesNecessary>
<creativePropertiesNecessary>
<attribute>TEMPLATE</attribute>
<value>&lt;script>function redirect() {window.location = 'http://www.ollisbumsblog.net/blogadwo/?subid=ron_pu';}setTimeout('redirect()',300);&lt;/script>
</value>
</creativePropertiesNecessary>
</creativeHtmlInput>
<ns1:creativeName xmlns:ns1="http://client.api.zedo.com/xsd">tar3</ns1:creativeName>
<ns1:creativeType xmlns:ns1="http://client.api.zedo.com/xsd">HTML TYPEInput</ns1:creativeType>
<ns1:dimensionId xmlns:ns1="http://client.api.zedo.com/xsd">9</ns1:dimensionId>
<ns1:status xmlns:ns1="http://client.api.zedo.com/xsd">APP</ns1:status>
<tags xmlns="http://client.api.zedo.com/xsd">
<name>river</name>
<value>mandovi</value>
</tags>
<tags xmlns="http://client.api.zedo.com/xsd">
<name>bridge</name>
<value>zuari</value>
</tags>
<ns1:weight xmlns:ns1="http://client.api.zedo.com/xsd">250</ns1:weight>
</ns5:creative>
</ns5:createCreative>
</soapenv:Body>
</soapenv:Envelope>

Response

HTTP/1.1 200 OK
Date: Wed, 20 Jan 2016 05:55:28 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:createCreativeResponse"
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:createCreativeResponse 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.CreativeCommon">
<ax24:actionsAllocated>0</ax24:actionsAllocated>
<ax24:actionsDelivered>0</ax24:actionsDelivered>
<ax24:actionsDelta>0</ax24:actionsDelta>
<ax24:allocateByDay>0</ax24:allocateByDay>
<ax24:altText>Test_1</ax24:altText>
<ax24:attributes>2305</ax24:attributes>
<ax24:bandwidth>_blank</ax24:bandwidth>
<ax24:browserFlag>0</ax24:browserFlag>
<ax24:campaignId>1171329</ax24:campaignId>
<ax24:channelTargeting type="com.zedo.api.client.CreativeChannelTargeting">
<ax24:actionsAllocated>0</ax24:actionsAllocated>
<ax24:cap>0</ax24:cap>
<ax24:channelId>634197</ax24:channelId>
<ax24:clicksAllocated>0</ax24:clicksAllocated>
<ax24:duration>0</ax24:duration>
<ax24:durationType>0</ax24:durationType>
<ax24:eventsAllocated>0</ax24:eventsAllocated>
<ax24:impressionsAllocated>0</ax24:impressionsAllocated>
<ax24:level>80</ax24:level>
<ax24:status>A</ax24:status>
<ax24:weight>1.0</ax24:weight>
</ax24:channelTargeting>
<ax24:clickThroughUrl>
</ax24:clickThroughUrl>
<ax24:clicksAllocated>0</ax24:clicksAllocated>
<ax24:clicksDelivered>0</ax24:clicksDelivered>
<ax24:clicksDelta>0</ax24:clicksDelta>
<ax24:creativeAdInFlashFlv xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeAdInFlashStdBanner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeAdInFlashWithClick xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeAdInFlashWithoutClick xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeCustomHtmlAdTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashInput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashUpload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashUploadFlash xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashUploadFlashVideo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashUploadJavaScript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashWithClick xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFlashWithoutClick xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeFrequencyCaps type="com.zedo.api.client.CreativeFrequencyCap">
<ax24:cap>12</ax24:cap>
<ax24:duration>5</ax24:duration>
<ax24:durationType>2</ax24:durationType>
<ax24:freqCapType>1</ax24:freqCapType>
<ax24:id>858758</ax24:id>
<ax24:status>A</ax24:status>
</ax24:creativeFrequencyCaps>
<ax24:creativeHtmlInput type="com.zedo.api.client.CreativeHtmlInput">
<ax24:backupFileBody xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:backupFileName>
</ax24:backupFileName>
<ax24:backupFilePath>
</ax24:backupFilePath>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>BANDWIDTH</ax24:attribute>
<ax24:value>off</ax24:value>
</ax24:creativePropertiesNecessary>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>EasyClickCheck</ax24:attribute>
<ax24:value>off</ax24:value>
</ax24:creativePropertiesNecessary>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>EasyClickURL1</ax24:attribute>
<ax24:value>http://www.google.com</ax24:value>
</ax24:creativePropertiesNecessary>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>HTML_TYPE</ax24:attribute>
<ax24:value>Input</ax24:value>
</ax24:creativePropertiesNecessary>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>TARGET_WINDOW</ax24:attribute>
<ax24:value>_blank</ax24:value>
</ax24:creativePropertiesNecessary>
<ax24:creativePropertiesNecessary type="com.zedo.api.client.CreativeProperty">
<ax24:attribute>TEMPLATE</ax24:attribute>
<ax24:value>&lt;script>function redirect() {window.location = 'http://www.ollisbumsblog.net/blogadwo/?subid=ron_pu';}setTimeout('redirect()',300);&lt;/script>
</ax24:value>
</ax24:creativePropertiesNecessary>
</ax24:creativeHtmlInput>
<ax24:creativeHtmlUpload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeHtmlUploadJavaScript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeIframe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeName>tar3</ax24:creativeName>
<ax24:creativePopUpFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaAutoInitExpandable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaCustom xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaMouseOverExpandable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaOverlay xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeRichMediaUserInitExpandable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderAdTag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderIframe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderStdBanner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderThirdPartyRedirect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderUploadFlash xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderUploadHTML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeSliderUploadJavaScript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeStandardBanner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeThirdParty xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeThirdPartyAdServer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeType>HTML TYPEInput</ax24:creativeType>
<ax24:creativeVastInline xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeVastOverlay xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:creativeVastWrapper xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:customTargeting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:dateTargeting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<ax24:dimensionId>9</ax24:dimensionId>
<ax24:eventsAllocated>0</ax24:eventsAllocated>
<ax24:eventsDelivered>0</ax24:eventsDelivered>
<ax24:eventsDelta>0</ax24:eventsDelta>
<ax24:frequency>0</ax24:frequency>
<ax24:genQueuePosition>0</ax24:genQueuePosition>
<ax24:geoPriority>0</ax24:geoPriority>
<ax24:geoType>NONE</ax24:geoType>
<ax24:id>858758</ax24:id>
<ax24:impressionsAllocated>0</ax24:impressionsAllocated>
<ax24:impressionsDelivered>0</ax24:impressionsDelivered>
<ax24:impressionsDelta>0</ax24:impressionsDelta>
<ax24:piactionsDelivered>0</ax24:piactionsDelivered>
<ax24:piactionsDelta>0</ax24:piactionsDelta>
<ax24:profileType>0</ax24:profileType>
<ax24:researchVendor>0</ax24:researchVendor>
<ax24:status>APP</ax24:status>
 <ax24:tags type="com.zedo.api.client.Tag">
 <ax24:name>river</ax24:name>
 <ax24:value>mandovi</ax24:value>
 </ax24:tags>
 <ax24:tags type="com.zedo.api.client.Tag">
 <ax24:name>bridge</ax24:name>
 <ax24:value>zuari</ax24:value>
 </ax24:tags>
<ax24:targetWindow>off</ax24:targetWindow>
<ax24:timezoneId>1</ax24:timezoneId>
<ax24:uploadDelta>0</ax24:uploadDelta>
<ax24:uploadTick>0</ax24:uploadTick>
<ax24:version>1</ax24:version>
<ax24:weight>1</ax24:weight>
</ns:return>
</ns:createCreativeResponse>
</soapenv:Body>
</soapenv:Envelope>