Hi Mukut,

You need to provide a matchtype, as shown in
http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/Examples/v200909/GetRelatedKeywords.cs#52
to fix this issue.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Jul 31, 6:15 pm, Mukut <muk143kan...@gmail.com> wrote:
> My code is as below
>
>  AdWordsUser user = new AdWordsUser();
>              //Get the TargetingIdeaService.
>             TargetingIdeaService targetingIdeaService =
> (TargetingIdeaService)user.GetService(AdWordsService.v200909.TargetingIdeaS 
> ervice);
>             Keyword keyword = new Keyword();
>             keyword.text = urlTW;
>             keyword.matchTypeSpecified = false;
>             keyword.matchType = KeywordMatchType.EXACT;
>
>             RelatedToKeywordSearchParameter searchParameter = new
> RelatedToKeywordSearchParameter();
>             searchParameter.keywords = new Keyword[]
> { keyword };
>
>             TargetingIdeaSelector selector = new
> TargetingIdeaSelector();
>             selector.searchParameters = new SearchParameter[]
> { searchParameter };
>             selector.ideaTypeSpecified = true;
>             selector.ideaType = IdeaType.KEYWORD;
>             selector.requestTypeSpecified = true;
>             selector.requestType = RequestType.IDEAS;
>
>             Paging paging = new Paging();
>             paging.startIndex = 0;
>             paging.startIndexSpecified = true;
>             paging.numberResults = 20;
>             paging.numberResultsSpecified = true;
>
>             selector.paging = paging;
>
>             try
>             {
>                 TargetingIdeaPage page =
> targetingIdeaService.get(selector);
>
>                 if (page != null && page.entries != null)
>                 {
>                     Console.WriteLine("There are a total of {0}
> keywords related to '{1}'. The first {2}" +
>                       " entries are displayed below: \n",
> page.totalNumEntries, urlTW,
>                       page.entries.Length);
>
>                     foreach (TargetingIdea idea in page.entries)
>                     {
>                         foreach (Type_AttributeMapEntry entry in
> idea.data)
>                         {
>                             if (entry.key == AttributeType.KEYWORD)
>                             {
>                                 KeywordAttribute kwdAttribute =
> entry.value as KeywordAttribute;
>                                 Console.WriteLine("Related keyword
> with text = '{0}' and match type = '{1}'" +
>                                   " was found.",
> kwdAttribute.value.text, kwdAttribute.value.matchType);
>                             }
>                         }
>                     }
>                 }
>                 else
>                 {
>                     Console.WriteLine("No related keywords were found
> for your keyword.");
>                 }
>             }
>             catch (Exception ex)
>             {
>                 Console.WriteLine("Failed to retrieve related
> keywords. Exception says \"{0}\"",
>                     ex.Message);
>             }
>
> And request with response is above reply. Please check it and guide
> for solve the error.
>
> On Jul 31, 5:11 pm, Mukut <muk143kan...@gmail.com> wrote:
>
>
>
> > Dear Sir,
>
> > I am sending my total details of my web application and can't found
> > the problem. Please verify these steps with spending some time to
> > relief me from this problem.
>
> > I am configure in my web.config for getting list on keyword  ideas
> > using Google sandbox api as below and after running the code write a
> > request and response in a Log file also
>
> > as below. An error is returned in this application. But can't
> > understand what to do.
>
> > My application's is using ASP.NET 2008 and C# and goal to result like
> > this url but just getting keywords
>
> >    https://adwords.google.com/o/Targeting/Explorer?__u=4468366968&__c=25...
>
> > Web services present in my web application are
>
> >    KeywordToolService.wsdl,
> >    TargettingIdeaService.wsdl and
> >    AdGroupCriterionService.wsdl.
>
> > Service is used as your suggestion "TargettingIdeaService" and code is
> > use "awapi_dotnet_lib_9.0.0\Examples\v200909\GetRelatedKeywords.cs".
>
> > Web.config file as below
>
> >      <configSections>
> >                 <section name="AdWordsApi"
> > type="com.google.api.adwords.lib.ApplicationConfiguration,google-api-
> > adwords-dotnet"/>
> >      </configSections>
> >      <AdWordsApi>
> >                 <!-- Change the appropriate flags to turn on SOAP logging. 
> > -->
> >                 <add key="LogPath" value="D:\mywebsitename\Log\"/>
> >                 <add key="LogToConsole" value="false"/>
> >                 <add key="LogToFile" value="true"/>
> >                 <add key="MaskCredentials" value="false"/>
> >                 <!-- Fill the following values if you plan to use a proxy 
> > server.-->
> >                 <add key="ProxyServer" value=""/>
> >                 <add key="ProxyUser" value=""/>
> >                 <add key="ProxyPassword" value=""/>
> >                 <add key="ProxyDomain" value=""/>
> >                 <!-- Uncomment this key if you want to disable gzip 
> > compression in
> > SOAP requests.-->
> >                 <!--<add key="EnableGzipCompression" value="false"/>-->
> >                 <!-- Fill the header values. -->
> >                 <add key="CompanyName" value="Test_Company"/>
> >                 <add key="Email" value="muk143kan...@gmail.com"/>
> >                 <add key="Password" value="mypassword"/>
> >                 <add key="ClientEmail" 
> > value="client_1+muk143kan...@gmail.com"/>
> >                 <add key="DeveloperToken" 
> > value="muk143kan...@gmail.com+usd"/>
> >                 <!-- Application token is now optional and will be ignored 
> > by the
> > server. -->
> >                  <add key="ApplicationToken" value="ignored"/>
> >                 <!-- Uncomment this key and comment ClientEmail if you want 
> > to
> > specify customer id instead of customer email. -->
> >                 <!-- <add key="ClientCustomerId"
> > value="ENTER_YOUR_CLIENT_CUSTOMER_ID_HERE"/> -->
> >                 <!-- Uncomment this if you want to reuse an authToken 
> > multiple
> > times. -->
> >                 <!--<add key="AuthToken" 
> > value="ENTER_YOUR_AUTH_TOKEN_HERE"/> -->
> >                 <!-- Uncomment this key if you want to use v13 sandbox. -->
> >                  <add key="LegacyAdWordsApi.Url" 
> > value="https://sandbox.google.com"/
>
> >                 <!-- Uncomment this key if you want to use AdWords API 
> > sandbox. -->
> >                 <add key="AdWordsApi.Url" 
> > value="https://adwords-sandbox.google.com"/
>
> >         </AdWordsApi>
>
> > After running this code
>
> > I gave a keyword as website url in a textbox and Click a button to
> > generate Keyword Ideas list but get nothing after run.
> > All the code is under OnClick button Event and a request and response
> > are return into my sop_xml.log file into Log folder in D drive.
> > The request and response is as below
>
> > Request
> > -------
>
> > POST /api/adwords/o/v200909/TargetingIdeaService
> > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
> > Protocol 2.0.50727.1433)
> > VsDebuggerCausalityData:
> > uIDPo0AJeaOQ9etFiqvUazQWfxYAAAAAQtj2OFvpi0aOd9vfrYUEdYWzSxiuqFVHv6nKBAIhdR8 
> > ACQAA
> > Content-Type: text/xml; charset=utf-8
> > SOAPAction: ""
> > Host: adwords-sandbox.google.com
> > Content-Length: 1630
> > Accept-Encoding: gzip
> > Connection: Keep-Alive
>
> > <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/2001/
> > XMLSchema"><soap:Header><RequestHeader xmlns="https://
> > adwords.google.com/api/adwords/o/v200909"><applicationToken
> > xmlns="https://adwords.google.com/api/adwords/cm/v200909";>ignored</
> > applicationToken><authToken xmlns="https://adwords.google.com/api/
> > adwords/cm/v200909">DQAAAI8AAAAX_T5c03TviHlvy-
> > wf6YzhW9dKeel7tVoEIa8ZPrbcY9bSqGcOMH0Nx6cHmgGd6tafvZnoBstRAFuqRSwqcbNp_qEM3 
> > XBIo5jlQt35d-
> > my2m4dhViHeaiBOUudXcn_SJmto8P-Ev07VGoNVdi4SoyBS-
> > enZzGnKLoUZWVNFj8iLAmkFktlxV_B2793W5QrOJE</authToken><clientEmail
> > xmlns="https://adwords.google.com/api/adwords/cm/
> > v200909">client_1+muk143kan...@gmail.com</clientEmail><developerToken
> > xmlns="https://adwords.google.com/api/adwords/cm/
> > v200909">muk143kan...@gmail.com+usd</developerToken><userAgent
> > xmlns="https://adwords.google.com/api/adwords/cm/v200909";>AWAPI
> > DotNetLib 9.0.0 - Test_Company</userAgent></RequestHeader></
> > soap:Header><soap:Body><get xmlns="https://adwords.google.com/api/
> > adwords/o/v200909"><selector><searchParameters
> > xsi:type="RelatedToKeywordSearchParameter"><keywords><text
> > xmlns="https://adwords.google.com/api/adwords/cm/v200909";>Test Key
> > Developer</text></keywords></searchParameters><ideaType>KEYWORD</
> > ideaType><requestType>IDEAS</requestType><paging><startIndex
> > xmlns="https://adwords.google.com/api/adwords/cm/v200909";>0</
> > startIndex><numberResults xmlns="https://adwords.google.com/api/
> > adwords/cm/v200909">20</numberResults></paging></selector></get></
> > soap:Body></soap:Envelope>
>
> > Response
> > --------
>
> > Content-Encoding:
> > Transfer-Encoding: chunked
> > X-Content-Type-Options: nosniff
> > X-Frame-Options: SAMEORIGIN
> > X-XSS-Protection: 1; mode=block
> > Cache-Control: private, max-age=0
> > Content-Type: text/xml; charset=UTF-8
> > Date: Sat, 31 Jul 2010 11:26:49 GMT
> > Expires: Sat, 31 Jul 2010 11:26:49 GMT
> > Server: GSE
>
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
> > envelope/"><soap:Header><ns2:ResponseHeader xmlns:ns2="https://
> > adwords.google.com/api/adwords/o/v200909" xmlns="https://
> > adwords.google.com/api/adwords/cm/
> > v200909"><requestId>f91404e7bb4020a240d84940b1e4b3a3</
> > requestId><operations>1</operations><responseTime>21452</
> > responseTime><units>1</units></ns2:ResponseHeader></
> > soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</
> > faultcode><faultstring>[RequiredError.REQUIRED @
>
> ...
>
> read more »

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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

Reply via email to