Hi,

I’m trying again to upload HTML5 as a media bundle asset (using the example 
for image asset upload: 
https://developers.google.com/adwords/api/docs/samples/php/miscellaneous#upload-an-image-asset
)

My code is like this:

public function uploadHtml5Asset($url)
{
    /** @var AssetService $assetService */
   $assetService = 
$this->googleApiClient->get($this->session,AssetService::class);
   $asset = new MediaBundleAsset();
   $asset->setMediaBundleData(file_get_contents($url));
    $operation = new AssetOperation();
    $operation->setOperand($asset);
    $operation->setOperator(Operator::ADD);

    return $assetService->mutate([$operation]);

}

I’m using *'https://goo.gl/9Y7qI2 <https://goo.gl/9Y7qI2>**’* as url (and 
this url works well when I’m uploading the same media bundle using 
MediaService).
But when for my example I’m getting error: 
[InternalApiError.ERROR_GENERATING_RESPONSE 
@ com.google.ads.api.services.common.error.InternalApiError.
SOAP log:

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Date: Wed, 21 Aug 2019 13:09:39 GMT
Expires: Wed, 21 Aug 2019 13:09:39 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><requestId>000590a0491c22970ae9e9127408961b</requestId><serviceName>AssetService</serviceName><methodName>mutate</methodName><operations>0</operations><responseTime>440</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[InternalApiError.ERROR_GENERATING_RESPONSE
 @ 
com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring><detail><ApiExceptionFault
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><message>[InternalApiError.ERROR_GENERATING_RESPONSE
 @ 
com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="InternalApiError"><fieldPath></fieldPath><trigger></trigger><errorString>InternalApiError.ERROR_GENERATING_RESPONSE</errorString><ApiError.Type>InternalApiError</ApiError.Type><reason>ERROR_GENERATING_RESPONSE</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>


Please advise.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5d9d9d0b-55e7-4468-9894-20ef4cf7a530%40googlegroups.com.

Reply via email to