Image ads update - the api server is not ignoring ad's elements upon an ad update soap request

22 views
Skip to first unread message

Yaro...@gmail.com

unread,
Apr 21, 2008, 5:26:12 AM4/21/08
to AdWords API Forum, adwordsa...@google.com
1.when trying to update an image ad the google api server isn't
ignoring the image elements sent:

--------------------
Soap request:
--------------------
<soap:Body><updateAds xmlns="https://adwords.google.com/api/adwords/
v11">
<ads xsi:type="ImageAd">
<adGroupId>26227</adGroupId>
<adType>ImageAd</adType>
<destinationUrl>http://akatracking.esearchvision.com</destinationUrl>
<disapproved>false</disapproved>
<displayUrl>subaccount-360.com</displayUrl>
<exemptionRequest xsi:nil="true" />
<id>17380</id>
<status>Disabled</status>
<image>
<data xsi:nil="true" />
<height>250</height>
<imageUrl>https://sandbox.google.com/sandboximages/image.jpg</
imageUrl>
<mimeType>image/jpeg</mimeType>
<name>doc_361_3112071159</name>
<shrunkenUrl>https://sandbox.google.com/sandboximages/shrunken.jpg</
shrunkenUrl>
<thumbnailUrl>https://sandbox.google.com/sandboximages/thumbnail.jpg</
thumbnailUrl>
<type>image</type>
<width>300</width>
</image>
</ads></updateAds></soap:Body>

--------------------------------------------
the soap response i'm getting:
--------------------------------------------

<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>

<faultstring>java.lang.NullPointerException</faultstring>

<detail>
<ns1:stackTrace xmlns:ns1="http://xml.apache.org/
axis/">java.lang.NullPointerException
at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:
98)
at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:
255)
at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:
515)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:
1077)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1138)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:
199)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:342)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:
146)
at
com.google.ads.netapi.config.AdWordsApiProvider.processMessage(AdWordsApiProvider.java:
62)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:
319)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:
450)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:
637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
301)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at com.google.gse.FilteredServlet
$ChainEnd.doFilter(FilteredServlet.java:153)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
46)
at com.google.gse.FilteredServlet$Chain.doFilter(FilteredServlet.java:
131)
at com.google.soap.base.LoggingFilter.doFilter(LoggingFilter.java:
142)
at com.google.gse.FilteredServlet$Chain.doFilter(FilteredServlet.java:
131)
at
com.google.servlet.balancing.LoadBalancingFilter.doFilter(LoadBalancingFilter.java:
152)
at com.google.gse.FilteredServlet$Chain.doFilter(FilteredServlet.java:
131)
at com.google.gse.FilteredServlet.service(FilteredServlet.java:103)
at com.google.gse.HttpConnection.runServlet(HttpConnection.java:603)
at com.google.gse.HttpConnection.run(HttpConnection.java:527)
at com.google.gse.DispatchQueue$WorkerThread.run(DispatchQueue.java:
339)
</ns1:stackTrace>

<ns2:isRuntimeException xmlns:ns2="http://xml.apache.org/
axis/">true</ns2:isRuntimeException>

</detail>

</soapenv:Fault>
</soapenv:Body>

2. only when ommiting the image properties i get a positive response.
is this normal? :

-------------------------------
working Soap request:
-------------------------------

<soap:Body>
<updateAds xmlns="https://adwords.google.com/api/adwords/v11">
<ads xsi:type="ImageAd">
<adGroupId>26227</adGroupId>
<adType>ImageAd</adType>
<destinationUrl>http://akatracking.esearchvision.com</destinationUrl>
<disapproved>false</disapproved>
<displayUrl>subaccount-360.com</displayUrl>
<exemptionRequest xsi:nil="true" />
<id>17380</id>
<status>Disabled</status>
</ads>
</updateAds>
</soap:Body>

AdWords API Advisor

unread,
Apr 24, 2008, 1:51:46 PM4/24/08
to AdWords API Forum
Hello,

Do you get the same sort of error in the production environment as
well? Can you provide the requestid in the response header of the SOAP
call to the production environment if it does?

The call to updateAds() should ignore all other fields in the request
besides <status>.

Cheers,
-Jeff Posnick, AdWords API Team


On Apr 21, 5:26 am, "Y...@esearchvision.com" <Yaron...@gmail.com>
wrote:

Yaron

unread,
May 21, 2008, 4:46:19 AM5/21/08
to AdWords API Forum
Yes, the error came from both the Dev & Prod environment.

So to conclude the eventual situation: when updating an image-ad, one
should not send any image information.

Thanks

AdWords API Advisor

unread,
May 21, 2008, 11:07:43 AM5/21/08
to AdWords API Forum
Hello Yaron,

After experimenting a bit with you sample request, I believe that the
error occurs not because there is an <image> element in your update,
but rather because the <image> element contains a <data xsi:nil="true"/
> sub-element. If you either omit the <data> element entirely or don't
explicitly set it to nil with xsi:nil="true", the request should go
through properly. The NullPointerException is thrown when the server
tries to deserialize the null <data> element.

Cheers,
-Jeff Posnick, AdWords API Team


Yaron

unread,
May 21, 2008, 12:11:04 PM5/21/08
to AdWords API Forum
Hi Jeff,

thank you for the precise answer, i tried it and it works like you
said.

the problem is solved though, when changing <data xsi:nil="true"/>
element to <data xsi:nil="false"/>.

so apparently the server is ignoring the elements but not the
attributes...

cheers,

yaron




Reply all
Reply to author
Forward
0 new messages