这是我的coldfusion web服务。当我使用soapUI工具调用'test‘时,我收到以下消息
"<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXParseException: Premature end of file."
错误。
在这个问题上,有人能帮我吗?我已经在网上找过了,但没找到。有什么代码问题吗?
我需要使用<cfproperty>标签吗?
<cfcomponent output="false">
<!--- initialisation --->
<cffunction
name="init"
output="false"
hint="return an initialized object.">
<!--- Return THIS reference. --->
<cfreturn THIS />
</cffunction>
<!--- ping --->
<cffunction
name="test"
access="remote"
returntype="numeric"
output="false"
hint="return an true = 0.">
<!--- declare local variables --->
<cfset var local = 0 />
<!--- Return 0. --->
<cfreturn local />
</cffunction>
</cfcomponent>发布于 2010-10-15 00:51:17
有几个问题:你在用CF9吗?当您直接调用它(不是通过SoapUI,而是在浏览器中作为http调用)时会发生什么?
此外,我强烈建议不要在函数中使用“局部”作为变量名-- CF9在函数中如何限定变量的作用域方面引入了一些更改,并将其用作受约束作用域的名称。
https://stackoverflow.com/questions/3935399
复制相似问题