4 messages in com.googlegroups.adwords-apiRe: AdWords API Re: addCriteria resul...
FromSent OnAttachments
Chris Roos25 Sep 2006 04:43 
Chris Roos26 Sep 2006 01:47 
Chris Roos26 Sep 2006 06:12 
Patrick Chanezon27 Sep 2006 08:40 
Subject:Re: AdWords API Re: addCriteria results in Abstract keyValue without superclass error
From:Patrick Chanezon (chan@gmail.com)
Date:09/27/2006 08:40:03 AM
List:com.googlegroups.adwords-api

Glad that you fixed the issue. The adwords4r librayr is an open source project: you're more than welcome to submit additional samples that will help other developers not falling into the same traps. The project's homepage is at http://code.google.com/p/google-api-adwords-ruby/

P@

On 9/26/06, Chris Roos <chri@gmail.com> wrote:

Right then, it appears I wasn't sending the criterionType element.

Adding..

<criterionType>Keyword</criterionType>

.. to my soap request fixed the problem.

Chris

On 9/26/06, Chris Roos <chri@gmail.com> wrote:

I have only just got round to trying this in production (was trying in sandbox yesterday) and am getting the exact same error.

I noticed that the specs state that type is required when adding a keyword which I was previously not sending. I have now added this and am still receiving the same error.

Anyone have any ideas?

Cheers,

On 9/25/06, Chris Roos <chri@gmail.com> wrote:

Using adwords4r against the sandbox.

I use getAdGroup to ensure that I have access to the AdGroup that I am trying to attach a keyword to (id 2597). This succeeds.

I then use the following code...

--code--

keyword = AdWords::Keyword.new keyword.text = 'text' keyword.adGroupId = 2597 keyword.maxCpc = 1000

p adwords.addCriteria([keyword])

--/code--

which results in the following xml (this is just the body).

--soap--

<env:Body> <addCriteria xmlns="https://adwords.google.com/api/adwords/v5"> <newCriteria> <adGroupId>2597</adGroupId> <maxCpc>1000</maxCpc> <text>text</text> </newCriteria> </addCriteria> </env:Body>

--/soap--

The error I get back is

--soap--

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

<faultstring>java.lang.RuntimeException: Abstract keyValue without superclass.</faultstring>

<detail> <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.lang.RuntimeException: Abstract keyValue without superclass. at

com.google.soap.base.PolymorphicBeanDeserializer.startElement( PolymorphicBeanDeserializer.java:70)

at

org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1038)

at org.apache.axis.message.SAX2EventRecorder.replay( SAX2EventRecorder.java:159) 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:48)

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:124) at com.google.soap.base.LoggingFilter.doFilter( LoggingFilter.java:136) at com.google.gse.FilteredServlet$Chain.doFilter( FilteredServlet.java:102) at com.google.servlet.balancing.LoadBalancingFilter.doFilter( LoadBalancingFilter.java:167) at com.google.gse.FilteredServlet$Chain.doFilter( FilteredServlet.java:102) at com.google.gse.FilteredServlet.service(FilteredServlet.java :82) at com.google.gse.HttpConnection.runServlet( HttpConnection.java:469) at com.google.gse.HttpConnection.run(HttpConnection.java:397) at com.google.gse.DispatchQueue$WorkerThread.run( DispatchQueue.java:266) </ns1:stackTrace>

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

</detail>

</soapenv:Fault>

--/soap--

Does anyone have any ideas?

Cheers,