dongxiaoguang9108 2018-12-11 13:00
浏览 31

在Google广告管理系统API的CreativeService-> createCreatives中使用Google DFP广告管理系统 - 解组错误

I am trying to create the creative using the google ad manager API.Following are the details:

Version : v201808

Service : CreativeService

Operation : createCreatives

I tried executing the API using the library code which is provided by google for PHP.

createCreative using googleads-php-lib

Here's my code snippet :

Getting the service by SoapClient :

$creative_Service = $this->getService('CreativeService');

Setting the imageCreative :

$imageCreative = new ImageCreative();
$imageCreative->setName('Image creative #' . uniqid());
$imageCreative->setAdvertiserId(4659289603);
$imageCreative->setDestinationUrl('http://google.com');
$size = new Size();
$size->setWidth(600);
$size->setHeight(315);
$size->setIsAspectRatio(false);
$imageCreative->setSize($size);
$creativeAsset = new CreativeAsset();
$creativeAsset->setFileName(300);
$creativeAsset->setAssetByteArray(<base64StringHere>);
$imageCreative->setPrimaryImageAsset($creativeAsset);

After passing the above imageCreative to API with SoapClient :

$results = $creative_Service->createCreatives([$imageCreative]);

in response I get :

Unmarshalling Error: cvc-type.2: The type definition cannot be abstract for element ns1:creatives.

What I've tried :

  • tried using v201811.
  • tried using zend soap client library instead of SoapClient.(In this case after executing API it directly throws an exception without any error message).

Can anyone please help me with the issue?

Also I've tried asking on google forum but so far no luck.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 连续两帧图像高速减法
    • ¥15 组策略中的计算机配置策略无法下发
    • ¥15 如何绘制动力学系统的相图
    • ¥15 对接wps接口实现获取元数据
    • ¥20 给自己本科IT专业毕业的妹m找个实习工作
    • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
    • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
    • ¥50 mac mini外接显示器 画质字体模糊
    • ¥15 TLS1.2协议通信解密
    • ¥40 图书信息管理系统程序编写