IllegalArgumentException on CriterionService.updateCriteria

7 views
Skip to first unread message

aant

unread,
Nov 10, 2005, 7:38:34 PM11/10/05
to AdWords API Forum
I'm getting an IllegalArgumentException when calling
CriterionService.updateCriteria(). This is from a Java client, with
the code generated from Axis. I've tried Axis 1.2RC2, 1.2.1, and 1.3,
with the same results. Here is what the SOAP request looks like:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:email soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns1="https://adwords.google.com/api/adwords/v2">x...@yyy.com</ns1:email>
<ns2:password
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns2="https://adwords.google.com/api/adwords/v2">xxxxxxx</ns2:password>
<ns3:token soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns3="https://adwords.google.com/api/adwords/v2">zzzzzzzzzzzz</ns3:token>
<ns4:clientEmail
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns4="https://adwords.google.com/api/adwords/v2">g...@rrr.com</ns4:clientEmail>
<ns5:useragent
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns5="https://adwords.google.com/api/adwords/v2">wwwwwww</ns5:useragent>
</soapenv:Header>
<soapenv:Body>
<updateCriteria xmlns="https://adwords.google.com/api/adwords/v2">
<Criteria xsi:type="ns6:Keyword"
xmlns:ns6="https://adwords.google.com/api/adwords/v2">
<id xsi:type="xsd:long">1111111</id>
<adGroupId xsi:type="xsd:int">2222222</adGroupId>
<criterionType xsi:type="xsd:string">Keyword</criterionType>
<language xsi:type="xsd:string"/>
<status xsi:type="ns6:CriterionStatus">Disabled</status>
<negative xsi:type="xsd:boolean">false</negative>
<destinationUrl
xsi:type="xsd:string">http://www.newurl.com</destinationUrl>
<type xsi:type="ns6:KeywordType">Broad</type>
<maxCpc xsi:type="xsd:long">500000</maxCpc>
<text xsi:type="xsd:string">some text</text>
</Criteria>
</updateCriteria>
</soapenv:Body>
</soapenv:Envelope>

---------------------------------------------------------------------
The response:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.IllegalArgumentException</faultstring>
<detail>
<ns1:stackTrace
xmlns:ns1="http://xml.apache.org/axis/">java.lang.IllegalArgumentException
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at
org.apache.axis.utils.FieldPropertyDescriptor.set(FieldPropertyDescriptor.java:99)
at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75)
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
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.HttpConnection.runServlet(HttpConnection.java:433)
at com.google.gse.HttpConnection.run(HttpConnection.java:373)
at
com.google.gse.DispatchQueue$WorkerThread.run(DispatchQueue.java:256)
</ns1:stackTrace>
<ns2:isRuntimeException
xmlns:ns2="http://xml.apache.org/axis/">true</ns2:isRuntimeException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

----------------------------------------------------------
Any ideas for what could be wrong?

Thanks.

aant

unread,
Nov 10, 2005, 7:54:30 PM11/10/05
to AdWords API Forum
Upon further investigation, the problem seems to have to do with
specifying the criteriontype. When this isn't specified, the request
succeeds. However, the type matches the wsdl (String):

<criterionType xsi:type="xsd:string">Keyword</criterionType>

What could be wrong? It seems like the implementation on the server
doesn't match the wsdl.

- Anthony

aant

unread,
Nov 17, 2005, 2:01:28 PM11/17/05
to AdWords API Forum
Hello? Anyone seeing this, or is it just me?

molson

unread,
Dec 5, 2005, 10:18:39 AM12/5/05
to AdWords API Forum
I'm seeing the same problem, but I see it whether I pass in
CriterionType or not. Has there been any resolution to this problem?

Reply all
Reply to author
Forward
0 new messages