Hi SEMDEV, There was actually a new release of the Java Client Library today (6.2.0) that includes an example for the TargetingIdeaService:
http://code.google.com/p/google-api-adwords-java/source/browse/trunk/examples/v200909/GetRelatedKeywords.java Best, - Eric On Nov 25, 2:42 pm, SEM <[email protected]> wrote: > Hi Eric: > > I update my code to use the downloaded client library in Java i.e. > specifically adwords-api-6.0.0.jar (which encapsulates classes > generated from v13, v200906 and v200909 wsdls). > After this change, I had to update a small section of my code; > specifically this part: > > TargetingIdeaPage tip = tisi.getBulkKeywordIdeas(tis); > TargetingIdea[] tia = tip.getEntries(); > for (TargetingIdea ti : tia) > { > System.out.println(ti); > } > > Unfortunately, when I ran this, I get the same error on the call to > tisi.getBulkKeywordIdeas(tis). > > Exception in thread "main" AxisFault > faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server > faultSubcode: > faultString: Fault occurred while processing. > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/axis/}stackTrace:Fault occurred while > processing. > at org.apache.axis.message.SOAPFaultBuilder.createFault > (SOAPFaultBuilder.java:222) > at org.apache.axis.message.SOAPFaultBuilder.endElement > (SOAPFaultBuilder.java:129) > at org.apache.axis.encoding.DeserializationContext.endElement > (DeserializationContext.java:1087) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement > (Unknown Source) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan > EndElement > (Unknown Source) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl > $FragmentContentDriver.next(Unknown Source) > at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next > (Unknown Source) > at > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next > (Unknown Source) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan > Document > (Unknown Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse > (Unknown Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse > (Unknown Source) > at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse > (Unknown Source) > at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl > $JAXPSAXParser.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(Unknown Source) > 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.transport.http.HTTPSender.readFromSocket > (HTTPSender.java:796) > at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java: > 144) > 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.client.AxisClient.invoke(AxisClient.java:165) > 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.adwords.v200909.o.TargetingIdeaServiceSoapBindingStub.getBul > kKeywordIdeas > (TargetingIdeaServiceSoapBindingStub.java:1202) > > Have you or anyone else in the team got TargetingIdeaService to work > at your end? > I don't see any code examples that demonstrate this. > > Let me know. > > Thanks. > > SEMDEV > > On Nov 25, 9:32 am, AdWords API Advisor <[email protected]> > wrote: > > > > > Hi, > > > The error appears to be client side, related to XML marshaling or > > unmarshaling. One problem I see is around the > > TargetingIdeaPage.getEntries() method. The method should return an > > array of TargetingIdea objects, not a multidimensional array of > > Type_AttributeMapEntry. > > > http://code.google.com/apis/adwords/v2009/docs/reference/TargetingIde... > > > I believe for Axis to work correctly with some of our objects you need > > to ensure that wrapArrays=true when generating the classes. We use > > this option when we generate our classes for the AdWords API Java > > client library: > > > http://code.google.com/p/google-api-adwords-java/source/browse/trunk/.... > > > In general we recommend using the client libraries instead of using > > Axis directly. > > > http://code.google.com/p/google-api-adwords-java/ > > > Best, > > - Eric Koleda, AdWords API Team > > > On Nov 24, 7:17 pm, SEM <[email protected]> wrote: > > > > I am trying to use a keyword called 'seed' in seeding keyword > > > suggestions with local / global volume info. > > > How do I achieve this using the v2009 API? > > > > I've been trying to use the TargetingIdeaService but seem to be > > > running into a fault with no description. > > > > Here is the Java code I've used... > > > > TargetingIdeaServiceInterface tisi = new > > > TargetingIdeaServiceLocator().getTargetingIdeaServiceInterfacePort(); > > > updateHeaders((Stub) tisi); > > > > Keyword[] kwa = new Keyword[1]; > > > kwa[0] = new Keyword(); > > > kwa[0].setText("seed"); > > > kwa[0].setMatchType(KeywordMatchType.BROAD); > > > > RelatedToKeywordSearchParameter rtksp = new > > > RelatedToKeywordSearchParameter(); > > > rtksp.setKeywords(kwa); > > > > SearchParameter[] spa = { new > > > GlobalMonthlySearchesSearchParameter(), rtksp }; > > > > Paging pg = new Paging(); > > > pg.setNumberResults(100); > > > > TargetingIdeaSelector tis = new TargetingIdeaSelector(); > > > tis.setSearchParameters(spa); > > > tis.setLocaleCode("en_US"); > > > tis.setCurrencyCode("USD"); > > > tis.setIdeaType(IdeaType.KEYWORD); > > > tis.setRequestType(RequestType.IDEAS); > > > tis.setPaging(pg); > > > > TargetingIdeaPage tip = tisi.getBulkKeywordIdeas(tis); > > > Type_AttributeMapEntry[][] tame2a = tip.getEntries(); > > > for (Type_AttributeMapEntry[] tamea : tame2a) > > > { > > > for (Type_AttributeMapEntry tame : tamea) > > > { > > > System.out.println(tame); > > > } > > > } > > > > I get a strange fault as below with no details... > > > > Exception in thread "main" AxisFault > > > faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server > > > faultSubcode: > > > faultString: Fault occurred while processing. > > > faultActor: > > > faultNode: > > > faultDetail: > > > {http://xml.apache.org/axis/}stackTrace:Fault occurred while > > > processing. > > > at org.apache.axis.message.SOAPFaultBuilder.createFault > > > (SOAPFaultBuilder.java:222) > > > at org.apache.axis.message.SOAPFaultBuilder.endElement > > > (SOAPFaultBuilder.java:129) > > > at org.apache.axis.encoding.DeserializationContext.endElement > > > (DeserializationContext.java:1087) > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > > Source) > > > at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement > > > (Unknown Source) > > > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl > > > $FragmentContentDispatcher.dispatch(Unknown Source) > > > at > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument > > > (Unknown Source) > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > > > Source) > > > > Are there any code examples for this or can someone at Google review > > > this and point out the errors / corrections to be made? > > > > Thanks in advance.- Hide quoted text - > > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en.
