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:

  • Where is the setHeader method in Axis2 ?
  • If that method is no longer accessible, how do I specify for my object call to use Axis1.x NOT 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:

  • Server level
  • New setting named wsversion in the CF WebServices Administration screen
  • Application level (via the Application.cfc)
  • this.wssettings.version.publish = 1
  • this.wssettings.version.consume = 1
  • Component level
  • For publishing <cfcomponent wsversion="1">
  • For consuming createObject("webservice", theURL, {wsversion="1"})
  • 链接地址: http://www.djcxy.com/p/74060.html

    上一篇: ColdFusion不处理CFC的HTTP OPTIONS请求

    下一篇: 如何用CF10 Web服务创建SOAP头