“使用CreateObject(”webservice“,...)时”Java编译器报告的错误“

时间:2014-05-07 10:00:21

标签: web-services soap coldfusion coldfusion-10

我在ColdFusion 8中使用以下代码:

<cfset someVariable = createObject("webservice", "http://www.example.com/webservice")>

我现在已将此代码移至运行ColdFusion 10的服务器,但遗憾的是,在尝试创建存根文件时出现代码错误:

错误:

D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\example\schemas\_2004\_07\example_api_objects\Example.java:50:
getClass() in
org.example.schemas._2004._07.example_api_objects.Example cannot
override getClass() in java.lang.Object; overridden method is final
public java.lang.String getClass(){ ^ Note:
D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\tempuri\ExampleApiServiceStub.java
uses unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. 1 error

消息:

Errors reported by Java compiler:
D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\example\schemas\_2004\_07\example_api_objects\Example.java:50:
getClass() in
org.example.schemas._2004._07.example_api_objects.Example cannot
override getClass() in java.lang.Object; overridden method is final
public java.lang.String getClass(){ ^ Note:
D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\tempuri\ExampleApiServiceStub.java
uses unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. 1 error .

堆栈追踪:

coldfusion.jsp.CompilationFailedException: Errors reported by Java
compiler:
D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\example\schemas\_2004\_07\example_api_objects\Example.java:50:
getClass() in
org.example.schemas._2004._07.example_api_objects.Pricing cannot
override getClass() in java.lang.Object; overridden method is final
public java.lang.String getClass(){ ^ Note:
D:\ColdFusion10\cfusion\stubs\WS403970439_2\src\org\tempuri\ExampleApiServiceStub.java
uses unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. 1 error . at coldfusion.jsp.JavaCompiler.compileClass(JavaCompiler.java:152) at
coldfusion.xml.rpc.Axis2ServiceInfoGeneratorStrategy$2.run(Axis2ServiceInfoGeneratorStrategy.java:190)
at java.security.AccessController.doPrivileged(Native Method) at
coldfusion.xml.rpc.Axis2ServiceInfoGeneratorStrategy.generateServiceInfo(Axis2ServiceInfoGeneratorStrategy.java:175) at
coldfusion.xml.rpc.XmlRpcServiceImpl.generateServiceInfo(XmlRpcServiceImpl.java:379) at
coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:322) at
coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:689) at
coldfusion.xml.rpc.WebServiceProxyFactory.getProxy(WebServiceProxyFactory.java:22) at
coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65) at
coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:5757) at
coldfusion.runtime.CFPage.CreateObject(CFPage.java:5720) at
coldfusion.runtime.CFPage.CreateObject(CFPage.java:5654) at
coldfusion.runtime.CFPage.CreateObject(CFPage.java:5629) at
coldfusion.runtime.CFPage.CreateObject(CFPage.java:5576) at
cfols2ecfc750051733$funcCREATEWEBSERVICE.runFunction(D:\ftphome\britaccms-test\cfc\ols.cfc:596) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at
coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at
cfols2ecfc750051733$funcGETINDIVIDUALSBYEMAIL.runFunction(D:\ftphome\britaccms-test\cfc\ols.cfc:445) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:395) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at
cfols2ecfc750051733$funcCHECKWEBUSER.runFunction(D:\ftphome\britaccms-test\cfc\ols.cfc:382) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2624) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:488) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at
cfols2ecfc750051733$funcVALIDATEREGISTRATION.runFunction(D:\ftphome\britaccms-test\cfc\ols.cfc:790) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:395) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at
cfols2dregistration2ecfc676981290$funcGETCONTENT._factor2(D:\ftphome\britaccms-test\cfc\modules\ols-registration.cfc:130) at
cfols2dregistration2ecfc676981290$funcGETCONTENT._factor5(D:\ftphome\britaccms-test\cfc\modules\ols-registration.cfc:116) at
cfols2dregistration2ecfc676981290$funcGETCONTENT.runFunction(D:\ftphome\britaccms-test\cfc\modules\ols-registration.cfc:21) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:395) at
cfpage2ecfc2021877044$funcPOPULATEHTMLCONTAINERS.runFunction(D:\ftphome\britaccms-test\cfc\page.cfc:5658) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:395) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at
cfpage2ecfc2021877044$funcPARSEPAGECONTENT.runFunction(D:\ftphome\britaccms-test\cfc\page.cfc:3263) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373) at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:395) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2800) at
cfApplication2ecfm831509557._factor31(D:\ftphome\britaccms-test\Application.cfm:484) at
cfApplication2ecfm831509557._factor32(D:\ftphome\britaccms-test\Application.cfm:449) at
cfApplication2ecfm831509557._factor33(D:\ftphome\britaccms-test\Application.cfm:1) at
cfApplication2ecfm831509557.runPage(D:\ftphome\britaccms-test\Application.cfm:1) at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:33) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:352) at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at
coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at
coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) at
coldfusion.CfmServlet.service(CfmServlet.java:219) at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at
java.lang.Thread.run(Thread.java:722)

1 个答案:

答案 0 :(得分:2)

(来自评论......)

ColdFusion 10引入了对Axis 2的支持。只是为了咧嘴笑,如果设置version to Axis 1会有什么不同吗?即

createObject("webservice"
     , "http://www.example.com/webservice"
     , {wsversion="1",refreshwsdl="true"}
 )

注意:首次运行时只需要refreshwsdl以确保CF生成新的存根