Hi Rohan,

Downloading images is outside the scope of the API.  From looking at
the SOAP requests thought it appears that the image data in the failed
request is different than the image data in the working request.

Best,
- Eric

On Sep 20, 5:35 am, RohanP <roha...@cybage.com> wrote:
> Hello
>
> We are downloading image from Adwords and storing it in binary format
> and it is getting download correclty.
> We are getting image Url  from "Media_Size_StringMapEntry".
> The code for downloading image is given below. We refer this code from
> Adwords API Library 9.0.
>
> //// Code
> Media_Size_StringMapEntry[] mediaSize = ad.image.urls; // Get Mobile
> Image Url
> System.Net.WebRequest request =
> System.Net.HttpWebRequest.Create(mediaSize[0].value);
> System.Net.WebResponse response = request.GetResponse();
> System.IO.MemoryStream memStream = new System.IO.MemoryStream();
> using (System.IO.Stream responseStream = response.GetResponseStream())
>         {
>         byte[] strmBuffer = new byte[4096];
>         int bytesRead = responseStream.Read(strmBuffer, 0, 4096);
>         while (bytesRead != 0)
>                 {
>                 memStream.Write(strmBuffer, 0, bytesRead);
>                 bytesRead = responseStream.Read(strmBuffer, 0, 4096);
>                 }
>         }
> mobileImageAdImport.RawImage = memStream.ToArray();
>
> Is there any alternative for this Problem?
>
> Regards,
> Rohan
>
> On Sep 18, 2:35 am, AdWords API Advisor <adwordsapiadvi...@google.com>
> wrote:
>
>
>
> > Hi Rohan,
>
> > Looking at the two requests, it looks like the image data is not the
> > same.  Perhaps the image isn't always downloading correctly?
>
> > Best,
> > - Eric Koleda, AdWords API Team
>
> > On Sep 17, 5:39 am, RohanP <roha...@cybage.com> wrote:
>
> > > Hello Anash,
>
> > > Do you get time to look at this error?
> > > I have posted the request ID for the creating Mobile Image Ad on
> > > google for both the case failed & success.
> > > Let me know if you required more information.
>
> > > Regards,
> > > Rohan
>
> > > On Sep 15, 3:21 pm, RohanP <roha...@cybage.com> wrote:
>
> > > > Hi Anash ,
>
> > > > Thanks for replay.
> > > > below request id are for the same Mobile Image Ads.
> > > > First time it is giving Error and for same image the we get successful
> > > > for second time.
>
> > > > Request ID for failed request - bd4536a5d5209c86562efa2aac50385e
> > > > Request ID for Success request - ce4c9f34daf9c423a7948824fe13628e
>
> > > > Regards,
> > > > Rohan
>
> > > > On Sep 15, 11:53 am, AdWords API Advisor
>
> > > > <adwordsapiadvi...@google.com> wrote:
> > > > > Hi Rohan,
>
> > > > > Is it possible to post request ids for a failed and a successful
> > > > > request? I can take a look the request logs and find out what went
> > > > > wrong with the first request.
>
> > > > > Cheers,
> > > > > Anash P. Oommen,
> > > > > AdWords API Advisor.
>
> > > > > On Sep 14, 3:17 pm, RohanP <roha...@cybage.com> wrote:
>
> > > > > > I am implementing the feature "Google Mobile Image Ads" in our
> > > > > > application and facing issue described below.
>
> > > > > > while creating Mobile Image Ad through API, it is giving Error as
> > > > > >  "[ImageError.UNEXPECTED_SIZE @ 
> > > > > > operations[0].operand.ad.image.data]".
> > > > > > we are downloading the image binary through image URL and storing 
> > > > > > the
> > > > > > image into byte, With same image we are able to create ad using
> > > > > > Adwords UI. The image size & dimensions are as per given by Google
> > > > > > Adwords.
>
> > > > > > One more observation - With same data for Mobile Image Ad if we 
> > > > > > replay
> > > > > > for creating Ad on Adwords through API it is working. Means it 
> > > > > > giving
> > > > > > error for first time only.
>
> > > > > > Is there any way to create Mobile Image Ad passing image Url instead
> > > > > > of passing Image Data?
>
> > > > > > Please replay with your suggesion.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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

Reply via email to