How to Create SOAP Header with CF10 Web Service
In making a CF web-service call it was necessary to create a SOAP header. In CF9 we were able to use the setHeader()
method. This works on my production server (running CF9). However, I've upgraded my local system to CF10 (for dev purposes) and discovered this method no longer works. It throws the following error:
Web service operation setHeader with parameters {...} cannot be found.
When I dump the object, I see that org.apache.axis2.client.Stub
is used instead of org.apache.axis.client.Stub
. So my question is two fold:
setHeader
method in Axis2 ? I hope this makes sense.
How do I specify for my object call to use Axis1.x NOT Axis2
You can always switch back to Axis1, as described here and here. In summary:
...ColdFusion 10 allows you to specify the version of Axis in which WebServices should be published or consumed. [It] has given a control at three levels:
wsversion
in the CF WebServices Administration screen this.wssettings.version.publish = 1
this.wssettings.version.consume = 1
<cfcomponent wsversion="1">
createObject("webservice", theURL, {wsversion="1"})
上一篇: ColdFusion不处理CFC的HTTP OPTIONS请求
下一篇: 如何用CF10 Web服务创建SOAP头