Hi,

I am working with theexample located here:

https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201406/optimization/GetKeywordIdeas.java


I am changing the code as follow: Original CODE / MINE CODE

.....
languageParameter.setLanguages(new Language[] {english});

LocationSearchParameter locationSearchParameter = new 
LocationSearchParameter();
Location location = GetReachByCity.getLocationCriterionCity(session, 
"Princeton", "New Jersey").getLocation();
locationSearchParameter.setLocations(new Location[] {location});

selector.setSearchParameters(
                new SearchParameter[] {relatedToQuerySearchParameter, 
locationSearchParameter, languageParameter});
.....

This change works fine but if I am trying to search by American postal code 
instead it fails with the following error.
Any idea why ?

Location location = GetReachByZipCode.getLocationCriterionZipCode(session, 
"08540").getLocation();


Thank is advanced,
Asaf

The error:

20140929:14:17:13.594 ERROR "http-bio-8080"-exec-2 
com.my121.controllers.adnetworks.AdNetworksController - Failed to get 
keywords
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode: 
 faultString: [TargetingIdeaError.INVALID_SEARCH_PARAMETERS @ 
selector.searchParameters[3].locations[0]; 
trigger:'LocationSearchParameter']
 faultActor: 
 faultNode: 
 faultDetail: 
{https://adwords.google.com/api/adwords/o/v201406}ApiExceptionFault:<ns2:message>[TargetingIdeaError.INVALID_SEARCH_PARAMETERS
 
@ selector.searchParameters[3].locations[0]; 
trigger:'LocationSearchParameter']</ns2:message><ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type><ns2:errors
 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="TargetingIdeaError"><ns2:fieldPath>selector.searchParameters[3].locations[0]</ns2:fieldPath><ns2:trigger>LocationSearchParameter</ns2:trigger><ns2:errorString>TargetingIdeaError.INVALID_SEARCH_PARAMETERS</ns2:errorString><ns2:ApiError.Type>TargetingIdeaError</ns2:ApiError.Type><reason>INVALID_SEARCH_PARAMETERS</reason></ns2:errors>

[TargetingIdeaError.INVALID_SEARCH_PARAMETERS @ 
selector.searchParameters[3].locations[0]; 
trigger:'LocationSearchParameter']
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at 
org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
at 
org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
at 
com.google.api.ads.adwords.axis.v201406.cm.ApiException.getDeserializer(ApiException.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at 
org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at 
org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at 
org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at 
org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:378)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2778)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at 
com.google.api.ads.adwords.axis.v201406.o.TargetingIdeaServiceSoapBindingStub.get(TargetingIdeaServiceSoapBindingStub.java:1468)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
com.google.api.ads.common.lib.soap.SoapClientHandler.invoke(SoapClientHandler.java:109)
at 
com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:201)
at 
com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(SoapServiceClient.java:64)
at 
com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(SoapServiceClient.java:93)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/16ac479b-0620-4494-accb-20538427626d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to