首页 > 解决方案 > ColdFusion Web Service 在调用语句上突然抛出错误

问题描述

我在尝试学习时创建了 3 个 ColdFusion Web 服务。他们在星期四工作得很好,然后他们都在星期五的调用语句上抛出了错误。你应该只调用一次吗?

这是测试服务(hello.cfc):

<cfcomponent> 
<cffunction name="helloWorld" returnType="string" access="remote">
<cfreturn "Hello World!">
</cffunction> 
</cfcomponent> 

这是调用(hello.cfm):

<cfset wsURL = "https://myurl/cfwack/4/hello.cfc?wsdl">
<cfinvoke
  webservice = "#wsURL#"
  method = "helloWorld"
  returnVariable = "result">
<cfoutput> <H1> #result# </H1></cfoutput>

错误转储:

AxisFault faultCode: {schemas.xmlsoap.org/soap/envelope}Server.userException faultSubcode: 
faultString: org.xml.sax.SAXParseException; Premature end of file. 
faultActor: faultNode: faultDetail: {xml.apache.org/axis}stackTrace:org.xml.sax.SAXParseException; Premature end of file. at

org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org
.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org
.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org
.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at

org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org
.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org
.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org
.apache.xerces.parsers.XML11Configuration.pa... 

The specific sequence of files included or processed is: D:\HTTP\cfwack\4\hello.cfm, line: 6

标签: webservicecoldfusion

解决方案


推荐阅读