Hello Peeyush, If you have code that works fine using the Java client library in a standalone application but when you take the code and move it to a web app you get that ServiceException, it sounds very much like there's something different about your Java environment in the web app-- perhaps an older version of the client library is present on your CLASSPATH?
I took a look at the Java client library's issue tracker page and there's an open issue with a similar exception. I think it would be best to update that issue with your information, and follow the debugging steps mentioned in comment 6. That way you can interact directly with the Java client library's maintainer and he might have more specific recommendations as to what you could try. http://code.google.com/p/google-api-adwords-java/issues/detail?id=9 Cheers, -Jeff Posnick, AdWords API Team On Dec 19, 7:33 am, peeyush <[email protected]> wrote: > Hello > > when we have Run adword api code is standalone it work fine but when > we have add this code in web application(visual web jsf) it throw > following error. > > javax.xml.rpc.ServiceException: java.lang.ClassCastException: > com.google.api.adwords.v13.KeywordToolServiceSoapBindingStub > at com.google.api.adwords.lib.BaseCredentials.getService > (BaseCredentials.java:196) > at com.pspl.bamboocricket.KeywordSelection._init > (KeywordSelection.java:101) > at com.pspl.bamboocricket.KeywordSelection.init > (KeywordSelection.java:296) > > but we have comment following line in BaseCredentials.java file it > work fine. > ((AdWordsService) obj).setServiceAccountant(new ServiceAccountant > ((Stub) obj)); > > i am already post this query but you have given following suggestion > that use same version now i have check i am using v13 version in all > required places. > > I am using below credentials > > Map params = new HashMap(); > params.put("version", "v13"); > params.put("email", "xxxxxxxxxxxx"); > params.put("password", "xxxxxxxxxxxxxxxx"); > params.put("developerToken", "xxxxxxxxxxxxxxxxxx"); > params.put("applicationToken", "xxxxxxxxxxxxxxxxxx"); > params.put("useragent", "INSERT_COMPANY_NAME"); > params.put("clientId", "xxxxxxxxxxxx"); > params.put("alternateUrl", "https://adwords.google.com"); > > Pl z suggest how we can fixed this problem. > > Thanks > > peeyush goyal --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
