当使用<cfinvoke>标记使用ColdFusion 11调用web服务时,我将得到以下错误。
faultString:虚拟SOAP服务器没有这样的过程
我已经将所有正确的参数传递给该方法(尊重参数名称大小写)。
呼叫码
<cfinvoke Webservice="absolute link" method="method name" wsversion="1" refreshwsdl="true">
<cfinvokeargument name="paramone" value="valone">
<cfinvokeargument name="paramtwo" value="valtwo">
</cfinvoke>提前谢谢你的帮助。
发布于 2016-07-08 17:12:11
我找到了解决办法。由于某些原因,使用cfinvoke标记无法使用他们的web服务。
我使用cfhttp标记作为替代,并添加了一个名为"SOAPAction“的标头参数,并将其设置为一个我不能在这里共享的特定值。此外,action属性需要设置为"POST“。
最后的解决方案代码如下(其中wsRequest变量是要发送的xml ):
<cfhttp method="post" url="#application.WSDLEndpoint#">
<cfhttpparam type="header" name="content-type" value="text/xml">
<cfhttpparam type="header" name="SOAPAction" value="[specific absolute link]">
<cfhttpparam type="header" name="charset" value="utf-8">
<cfhttpparam type="xml" value="#wsRequest#" >
</cfhttp>https://stackoverflow.com/questions/38252686
复制相似问题