AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, Please have a look at my previous two posts. As we do not have access to the backend/server, it is very difficult for us to write a patch when the error message is very general like soap:ServerFault occurred while processing.. It would be nice to have help on the three issues/questions I posted above (yesterday - Mar 1st at 12:10 pm). Thanks. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, As part of my point 2 above, I forgot to mention that I uncomment the info and o blocks in the generated_classes.pl file. Thanks. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, I noticed something (though for v200906) at http://markmail.org/message/45745lrufwn3aejd#query:google%20adwords%20group%20perl+page:1+mid:xfjkjdy7hlrrmrf3+state:results It looks like the same is true for v200909 as well. Most likely the automatically (using wsdl2perl) generated classes in v200909 do not accept arrays even though the call migration guide says so. The alternate solution proposed in the discussion threads did not work for me for array of complex types. I have the following questions: 1) I cannot pass an array to new() even though an array is acceptable according to the call migration guide. As for example, TargatingIdeaSelector's searchParameters field should accept an array of complex types. If we try to pass an array of RelatedToKeywordSearchParameter, LanguageTargetSearchParameter, and CountryTargetSearchParameter, then a peculiar structure is produced and we get exceptions. If that is really the case then how are we supposed to use v200909 services to get the data we need? Our work is depends heavily on this service. 2) To get rid of the AuthToekn missing error, I modified the RequestHeader's namespace in the RequestHeader.pm file that I found under the TargetingIdeaService directory. After doing so and running my program I no longer get the AuthToken missing issue but still there is a problem. I am getting another soap error: soap:ServerFault occurred while processing.. I got similar problem with the InfoService. Basically my question is - how am I supposed to write a patch or modify the client library so that it will support InfoService and TagetingIdeaService and correct namespaces will be used? 3) If you do not have any suggestions regarding the above two issues then do you guys still have the plan that some services on v13 will sunset on April 22, 2010 though corresponding items in v200909 do not work? Thanks in advance for your help. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, It does not work. Basically doing so throws exception. I tried that couple of times without any success and that's why I have been looking for a Perl example that works. The code for the SerachParameter type class might be incomplete. Thanks for your time and reply. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Suraiya, Unfortunately I don't have a concrete Perl example. You just need to add all three search parameters into an array, and then set the searchParameters field to that array. my $selector = Google::AdWords::v200909::Types::TargetingIdeaSelector- >new({ requestType => 'IDEAS', paging =>$paging, ideaType => 'KEYWORD', searchParameters=> $serchParametersArray}); Best, - Eric On Feb 26, 3:38 am, Suraiya wrote: > Hi Eric, > I set the namespace to be cm in the RequestHeader for the > TargetingIdeaService and rebuilt the Client libraries. I am no longer > getting the authentication issue. > But I am getting another issue like ( 'faultcode' => 'soap:Server', > 'faultstring' => 'Fault occurred while processing.'). > > Based on the answer number 2 (building request structure) in your > latest post, exactly how can I specify the searchParameters in the > selector? > > my $selector = > Google::AdWords::v200909::Types::TargetingIdeaSelector->new({requestType => > 'IDEAS',paging =>$paging,ideaType => 'KEYWORD' > > ,searchParameters=> ...}); > > Could you please provide me a concrete Perl sample for this, which > would work for v200909? Let us assume that I want to specify the > RelatedToKeywordSearchParameter, LanguageTargetSearchParameter, and > CountryTargetSearchParameter in the searchParameters field. > > Thanks in advance. > Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, I set the namespace to be cm in the RequestHeader for the TargetingIdeaService and rebuilt the Client libraries. I am no longer getting the authentication issue. But I am getting another issue like ( 'faultcode' => 'soap:Server', 'faultstring' => 'Fault occurred while processing.'). Based on the answer number 2 (building request structure) in your latest post, exactly how can I specify the searchParameters in the selector? my $selector = Google::AdWords::v200909::Types::TargetingIdeaSelector- >new({requestType => 'IDEAS',paging =>$paging,ideaType => 'KEYWORD' ,searchParameters=> ...}); Could you please provide me a concrete Perl sample for this, which would work for v200909? Let us assume that I want to specify the RelatedToKeywordSearchParameter, LanguageTargetSearchParameter, and CountryTargetSearchParameter in the searchParameters field. Thanks in advance. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Suraiya, To address your issues: 1) authToken is missing in SoapHeader This error is being generated because the RequestHeader header has the wrong namespace (https://adwords.google.com/api/adwords/o/v200909). All headers should have the CM namespace (https://adwords.google.com/ api/adwords/cm/v200909). I found out that this is a known issue with the Perl client library, and there is currently no workaround. It's not clear when this issue will be resolved, and if you would like to create a patch for this problem we would be glad to add your fix to the library. 2) Building request structure If you create all of your search parameters before you create the selector then you can set them in the constructor of the selector for the field "searchParameters". Best, - Eric On Feb 24, 8:32 pm, Suraiya wrote: > Hi Eric, > Please have a look at my previous post as well. > Athttp://groups.google.com/group/adwords-api/browse_thread/thread/82bd7..., > you mentioned a valid soap structure. > How can I form that structure using different methods of objects of > type RelatedToKeywordSearchParameter, LanguageTargetSearchParameter, > CountryTargetSearchParameter etc instead of handcrafting the structure > myself. > > If I do something like this > my $selector = > Google::AdWords::v200909::Types::TargetingIdeaSelector->new({requestType => > 'IDEAS',paging =>$paging,ideaType => 'KEYWORD'}); > > my $relatedToKeywordSearchParameter = > Google::AdWords::v200909::Types::RelatedToKeywordSearchParameter->new(); > > $relatedToKeywordSearchParameter->set_keywords( > [{text => "Monkey",matchType => "BROAD" }]); > my $languageTargetSearchParameter = > Google::AdWords::v200909::Types::LanguageTargetSearchParameter->new(); > $languageTargetSearchParameter->set_languageTargets([{languageCode=> > "en"}]); > > my $countryTargetSearchParameter = > Google::AdWords::v200909::Types::CountryTargetSearchParameter->new(); > $countryTargetSearchParameter->set_countryTargets([{'countryCode' => > "US"}]); > > Then how am I supposed to call $selector->set_searchParameters or > something else so that I shall be able to create the desired structure > that you specified? > > Thanks a lot in advance. > Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, Please have a look at my previous post as well. At http://groups.google.com/group/adwords-api/browse_thread/thread/82bd7fcdff3afce1/, you mentioned a valid soap structure. How can I form that structure using different methods of objects of type RelatedToKeywordSearchParameter, LanguageTargetSearchParameter, CountryTargetSearchParameter etc instead of handcrafting the structure myself. If I do something like this my $selector = Google::AdWords::v200909::Types::TargetingIdeaSelector- >new({requestType => 'IDEAS',paging =>$paging,ideaType => 'KEYWORD'}); my $relatedToKeywordSearchParameter = Google::AdWords::v200909::Types::RelatedToKeywordSearchParameter- >new(); $relatedToKeywordSearchParameter->set_keywords( [{text => "Monkey",matchType => "BROAD" }]); my $languageTargetSearchParameter = Google::AdWords::v200909::Types::LanguageTargetSearchParameter->new(); $languageTargetSearchParameter->set_languageTargets([{languageCode=> "en"}]); my $countryTargetSearchParameter = Google::AdWords::v200909::Types::CountryTargetSearchParameter->new(); $countryTargetSearchParameter->set_countryTargets([{'countryCode' => "US"}]); Then how am I supposed to call $selector->set_searchParameters or something else so that I shall be able to create the desired structure that you specified? Thanks a lot in advance. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, I tried TargetingIdeaService on the sandbox. I am getting a soap error and I noticed that another person reported something similar at http://groups.google.com/group/adwords-api/browse_thread/thread/35994a667c80ea0b/3478cbed16b9a9d1?lnk=raot My code: --- my $client = Google::AdWords::Client->new({properties_file=> $properties_file}); my $paging = Google::AdWords::v200909::Types::Paging->new( { startIndex=> 0,numberResults=> 6 } ); my $relatedToKeywordSearchParameter = Google::AdWords::v200909::Types::RelatedToKeywordSearchParameter- >new(); $relatedToKeywordSearchParameter->set_keywords( [{text => "Monkey",matchType => "BROAD" }]); my $selector = Google::AdWords::v200909::Types::TargetingIdeaSelector- >new({requestType => 'IDEAS',paging =>$paging, ideaType => 'KEYWORD'}); $selector->set_searchParameters($relatedToKeywordSearchParameter); my $selVar = {selector=>$selector}; my $response = $client->TargetingIdeaService()->get($selVar); This is the part of the soap trace that I got using the soap lite debug all option http://www.w3.org/2001/XMLSchema- instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; >https://adwords.google.com/api/ adwords/o/v200909">x…...xx...@gmail.comx...@gmail.com++cadPerl Google::AdWords::Client 1.3.0: SuraiyatestfalseMonkeyBROADKEYWORDIDEAS06 >From the above trace it seems that I have the authToken. If I use $client->set_debug(*STDERR) then I see something like this: REDACTED In the response, I noticed the following error message that says that the "authToken is missing in SoapHeader". http://schemas.xmlsoap.org/soap/ envelope/">soap:ServerauthToken is missing in SoapHeader. while invoking public abstract com.google.ads.api.services.targetingideas.v200909.jaxbgen.TargetingIdeaPage com.google.ads.api.services.targetingideas.v200909.jaxbgen.TargetingIdeaServiceInterface.get(com.google.ads.api.services.targetingideas.v200909.jaxbgen.TargetingIdeaSelector) throws com.google.ads.api.services.targetingideas.v200909.jaxbgen.ApiException_Exception with params [com.google.ads.api.services.targetingideas.v200909.jaxbgen.targetingideaselec...@d295a8]. Thanks in advance for your time and help. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, Thanks for your response. Yes - location field (sandbox url appears there) is not in the soap trace. My supervisor helped me to be confident that the request in fact went to sandbox after my changes in the adwords.properties file. Once again thanks for time. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, I figured out the issue with the sandbox. In your adwords.properties or equivalent file, the field name for the sandbox should be alternateUrl instead of alternativeUrl. It looks like the documentation provided in the template for the adwords.properties file is wrong. I do not get any warning if I specify all the variables there even if one of them is optional. For the optional one I just had to specify blank as the value. Below is a sample (other combinations might work as well) of what I had to specify in the adwords.properties file to get rid of the problems and warnings. Now my request is going to the sandbox. email=...@gmail.com password= clientid=client_1+...@gmail.com userAgent=sandboxTest developertoken=...@gmail.com++cad applicationToken= alternateUrl=https://adwords-sandbox.google.com I am going to try "TargetingIdeaService" now and I shall get back to you if I have problem(s). :) Thanks. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Suraiya, It looks like you are making a successful request to the AdWords API sandbox environment. The alternativeUrl won't show up in the XML (the namespaces don't change for calls to the sandbox). Best, - Eric On Feb 23, 11:38 pm, Suraiya wrote: > Hi Eric, > Please have a look at my previous post in addition to this one. > Should the parameter name for the sandbox url be "alternativeUrl" in > the adwords.properties file? > I noticed a post on the issue > athttp://code.google.com/p/google-api-adwords-perl/issues/detail?id=7#c0 > > After executing display_stats.pl, I saw the following: (as this test > is accessing different service and the issue is with the sandbox url, > do you want me to create a separate post?) > > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 5. > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 12. > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 15. > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 21. > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 24. > Use of uninitialized value in hash element at /usr/local/share/perl/ > 5.8.8/Google/AdWords/Client.pm line 190, line 33. > [Tue Feb 23 19:44:29 2010] Outgoing Request: > http://www.w3.org/2001/XMLSchema- > instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; > > https://adwords.google.com/api/ > adwords/cm/v200909">REDACTED > client_1+x...@xxx....@xxx.xxx++cad developerToken> > Perl Google::AdWords::Client 1.3.0: suraiyatest userAgent>false ENV:Header> > https://adwords.google.com/api/adwords/cm/ > v200909"> > 2009022320100223 selector> > > [Tue Feb 23 19:44:30 2010] Incoming Response: > http://schemas.xmlsoap.org/soap/ > envelope/"> > x1 operations>1911 ResponseHeader> > https://adwords.google.com/api/adwords/ > cm/v200909">0 totalNumEntries>CampaignPage > DAILY period>Money ComparableValue.Type>0 amount>STANDARD > > > Please note that I have alternativeUrl set > tohttps://adwords-sandbox.google.com > in the adwords.properties file but it looks like this value is not > used in the request. Did I miss something? > > Thank you very much. > Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, Please have a look at my previous post in addition to this one. Should the parameter name for the sandbox url be "alternativeUrl" in the adwords.properties file? I noticed a post on the issue at http://code.google.com/p/google-api-adwords-perl/issues/detail?id=7#c0 After executing display_stats.pl, I saw the following: (as this test is accessing different service and the issue is with the sandbox url, do you want me to create a separate post?) Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 5. Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 12. Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 15. Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 21. Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 24. Use of uninitialized value in hash element at /usr/local/share/perl/ 5.8.8/Google/AdWords/Client.pm line 190, line 33. [Tue Feb 23 19:44:29 2010] Outgoing Request: http://www.w3.org/2001/XMLSchema- instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; > https://adwords.google.com/api/ adwords/cm/v200909">REDACTED client_1+x...@xxx....@xxx.xxx++cad Perl Google::AdWords::Client 1.3.0: suraiyatestfalse https://adwords.google.com/api/adwords/cm/ v200909"> 2009022320100223 [Tue Feb 23 19:44:30 2010] Incoming Response: http://schemas.xmlsoap.org/soap/ envelope/"> x11911 https://adwords.google.com/api/adwords/ cm/v200909">0CampaignPage DAILYMoney0STANDARD Please note that I have alternativeUrl set to https://adwords-sandbox.google.com in the adwords.properties file but it looks like this value is not used in the request. Did I miss something? Thank you very much. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, Thanks for your quick response. The example you provided is for a deprecated version. If you go to the link that you provided and then click on "Project home", you will see that information. I tried to execute the display_stats.pl that came with the installation of google adwords api v200909 and is in the "example" directory. Even if I uncomment the alternativeUrl property in the adwords.properties file, display_stats.pl still uses the live url instead of the one for the sandbox. Please note that it is reading email and other parameters correctly from the properties file. I noticed a warning like the following- "Use of uninitialized value in hash element at ……./Google/AdWords/ Client.pm line 190, ". I see the warning message irrespective of whether the code is using the default properties file or the one that I passed. To do that I followed the style used in the unit test samples in the "t" directory of that installation. How can I make the code working with the sandbox so that in the soap header I will see the sandbox url? If the code works for the sandbox then I shall try the TargetingIdeaService. Thanks in advance for your help. Suraiya -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Suraiya, The SOAP XML request is invalid because it is missing the and elements that wrap around the parameters. You can see the get_all_ads.pl sample code for how to get these elements to serialize correctly: http://code.google.com/p/adwords-api-perl-samples/source/browse/trunk/src/v200906/get_all_ads.pl You need to create the 'get' soap action object and the selector object needs to be stored in a selector field of an array: my $soap_action = SOAP::Data->name('get')->attr({'xmlns' => $namespace}); my $selector = SOAP::Data->name('selector' => { 'adGroupAdIdFilters' => [{ 'adGroupId' => { 'id' => $ad_group_id } }] }); my $response = $ad_group_ad_service->call($soap_action => $selector, $headers); my $ads = $response->result()->{'entries'}; Best, - Eric On Feb 22, 9:19 pm, "Suraiya R. Khan" wrote: > Hi Eric, > I am back to the project again and this is one of my samples. I tried many > combinations, but those did not work. I need to figure out a solution > quickly to complete my project on time. > Due to the existing infrastructure, I have to do this in Perl. > Thanks in advance for your help. > Suraiya > > Code > --- > > #hard coded value for the purpose of testing > #trying to get keyword variations for a seed keyword > > my $keyword = "monkey"; > my $match_type = 'BROAD'; > my $language = 'en'; > my $country = 'US'; > my $service; > my $headers; > > my $paging = Google::AdWords::v200909::Types::Paging->new( > { > startIndex=> 0,numberResults=> 6 > } > > ); > > my $relatedToKeywordSearchParameter = > Google::AdWords::v200909::Types::RelatedToKeywordSearchParameter->new(); > > $relatedToKeywordSearchParameter->set_keywords( > [{text => "$keyword",matchType => "$match_type" > > }]); > > my $selector = > Google::AdWords::v200909::Types::TargetingIdeaSelector->new({requestType => > 'IDEAS',paging =>$paging,ideaType => 'KEYWORD', searchParameters => > $relatedToKeywordSearchParameter}); > > $service = Google::AdWords::v200909::TargetingIdeaService->new(); > > #getting token after authentication > my $authToken = Google::AdWords::AuthToken::get_token({ > email => '@xxx.com',password => 'xxx'} > ); > > #forming request header > $headers = > Google::AdWords::v200909::TargetingIdeaService::RequestHeader->new( > { > applicationToken => 'xx', > authToken => "$authToken", > clientCustomerId => 'xxx', > developerToken => 'xx' > } > ); > > ... > #trying to get keyword suggestions for a seed keyword > my %ret = $service->get( $selector , $header); > ... > ... > ... > print Dumper(%ret); > > Part of the output that I got after executing the code: > --- - > > SOAP::Transport::HTTP::Client::send_receive: > POSThttps://adwords.google.com/api/adwords/o/v200909/TargetingIdeaService... > Accept: text/xml > Accept: multipart/* > Accept: application/soap > Content-Length: 1000 > Content-Type: text/xml; charset=utf-8SOAPAction: "" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; > > xmlns="https://adwords.google.com/api/adwords/o/v200909";>x > xxx >x Body> xsi:type="RelatedToKeywordSearchParameter">monkey tchType>BROADKEYWORD deaType>IDEAS0< > numberResults>6 > SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1ff8250) > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK > Cache-Control: private, max-age=0 > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>soap:ClientMes > sage > part searchParameters was not > recognized. > SOAP::Transport::HTTP::Client::DESTROY: () -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Eric, I am back to the project again and this is one of my samples. I tried many combinations, but those did not work. I need to figure out a solution quickly to complete my project on time. Due to the existing infrastructure, I have to do this in Perl. Thanks in advance for your help. Suraiya Code --- #hard coded value for the purpose of testing #trying to get keyword variations for a seed keyword my $keyword = "monkey"; my $match_type = 'BROAD'; my $language = 'en'; my $country = 'US'; my $service; my $headers; my $paging = Google::AdWords::v200909::Types::Paging->new( { startIndex=> 0,numberResults=> 6 } ); my $relatedToKeywordSearchParameter = Google::AdWords::v200909::Types::RelatedToKeywordSearchParameter->new(); $relatedToKeywordSearchParameter->set_keywords( [{text => "$keyword",matchType => "$match_type" }]); my $selector = Google::AdWords::v200909::Types::TargetingIdeaSelector->new({requestType => 'IDEAS',paging =>$paging,ideaType => 'KEYWORD', searchParameters => $relatedToKeywordSearchParameter}); $service = Google::AdWords::v200909::TargetingIdeaService->new(); #getting token after authentication my $authToken = Google::AdWords::AuthToken::get_token({ email => 'x...@xxx.com',password => 'xxx'} ); #forming request header $headers = Google::AdWords::v200909::TargetingIdeaService::RequestHeader->new( { applicationToken => 'xx', authToken => "$authToken", clientCustomerId => 'xxx', developerToken => 'xx' } ); ... #trying to get keyword suggestions for a seed keyword my %ret = $service->get( $selector , $header); ... ... ... print Dumper(%ret); Part of the output that I got after executing the code: SOAP::Transport::HTTP::Client::send_receive: POST https://adwords.google.com/api/adwords/o/v200909/TargetingIdeaServiceHTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 1000 Content-Type: text/xml; charset=utf-8SOAPAction: ""http://www.w3.org/2001/XMLSchema-instance"; xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/"; >https://adwords.google.com/api/adwords/o/v200909";>xmonkeyBROADKEYWORDIDEAS06 SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1ff8250) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Cache-Control: private, max-age=0 http://schemas.xmlsoap.org/soap/envelope/";>soap:ClientMessage part searchParameters was not recognized. SOAP::Transport::HTTP::Client::DESTROY: () -- 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-...@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.
AdWords API Re: Getting SOAP error while using TargetingIdeaService (Perl) : "searchParameters" not recognized
Hi Suraiya, Can you post some sample code and the SOAP XML request it generates? This information will give me a better idea of what's going wrong and how to resolve it. Best, - Eric Koleda, AdWords API Team On Jan 29, 6:20 pm, Suraiya wrote: > Hello Eric, > I am trying to use Perl TargetingIdeaService (in your v200909 API) to > retrieve keyword suggestions or variations for a seed keyword. There > is no sample perl code at > (http://code.google.com/p/adwords-api-perl-samples/source/browse/#svn/ > trunk/src/v200906%3Fstate%3Dclosed) > that shows how to use searchParameters for the TargetingIdeaService. I > looked at corresponding PHP, Ruby samples and tried something > equivalent in Perl but that throws a soap exception. > I got the following error message - "Message part searchParameters was > not recognized". > I tried so many different combinations with no success. > Could you please help? > > Thanks. > Suraiya -- 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-...@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.