Bing Api实施 [英] Bing Api Implementation
问题描述
从Bing Ads APi获取广告系列时出现以下错误。
I'm getting following error while getting campaigns from Bing Ads APi.
15:32:02,789 WARN  ; [org.apache.struts.action.RequestProcessor]抛出未处理的异常:class java.lang.ClassCastException
15:32:02,790 ERROR [org.apache.catalina.core.ContainerBase。[jboss.web ]。[localhost]。[/]。[action]]用于servlet操作的Servlet.service()抛出异常:
java.lang.ClassCastException:com.sun.proxy。$ Proxy201不能被强制转换为org.apache.cxf.endpoint.Client
在com.microsoft.bingads.internal.ServiceFactoryImpl.addUserAgent(ServiceFactoryImpl.java:160)[:]
在com.microsoft.bingads.internal.ServiceFactoryImpl.createProxyFromService(ServiceFactoryImpl.java:123)[:]
在com.microsoft.bingads.ServiceClient.getService(ServiceClient.java:111)[:]
at bingAds.BingUtil.getCampaigns(BingUtil.java:90)[:]
at bingAds.GlobesterConsBingAdsAction.GetCampaignDispatch(GlobesterConsBingAdsAction.java:18)[:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80-ea]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80-ea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80-ea]
15:32:02,789 WARN [org.apache.struts.action.RequestProcessor] Unhandled Exception thrown: class java.lang.ClassCastException
15:32:02,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/].[action]] Servlet.service() for servlet action threw exception:
java.lang.ClassCastException: com.sun.proxy.$Proxy201 cannot be cast to org.apache.cxf.endpoint.Client
at com.microsoft.bingads.internal.ServiceFactoryImpl.addUserAgent(ServiceFactoryImpl.java:160) [:]
at com.microsoft.bingads.internal.ServiceFactoryImpl.createProxyFromService(ServiceFactoryImpl.java:123) [:]
at com.microsoft.bingads.ServiceClient.getService(ServiceClient.java:111) [:]
at bingAds.BingUtil.getCampaigns(BingUtil.java:90) [:]
at bingAds.GlobesterConsBingAdsAction.GetCampaignDispatch(GlobesterConsBingAdsAction.java:18) [:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_80-ea]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0_80-ea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0_80-ea]
谢谢,
Rashi Srivastava
Rashi Srivastava
推荐答案
Hello。
Hello.
您使用的是Bing Ads Java SDK的9.3.4版本吗?请确保您拥有正确的依赖版本,例如 cxf-rt-frontend-jaxws
版本3.0.2 。您可以在此处找到Bing Ads Java SDK的所有依赖项列表: http: //mvnrepository.com/artifact/com.microsoft.bingads/microsoft.bingads/9.3.4
Are you using version 9.3.4 of the Bing Ads Java SDK? Please make sure you have the correct dependency versions e.g. cxf-rt-frontend-jaxws version 3.0.2. You can find a list of all dependencies for the Bing Ads Java SDK here: http://mvnrepository.com/artifact/com.microsoft.bingads/microsoft.bingads/9.3.4
If你创建一个Maven项目,例如在Eclipse中,依赖项是自动包含的。
If you create a Maven project e.g. in Eclipse, the dependencies are included automatically.
我希望这会有所帮助!
I hope this helps!
这篇关于Bing Api实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!