2012-09-19 51 views
1

在进行CF Web服务调用时,需要创建SOAP标头。在CF9中,我们能够使用setHeader()方法。这适用于我的生产服务器(运行CF9)。但是,我已将本地系统升级到CF10(用于开发目的),并发现此方法不再有效。它引发以下错误:如何使用CF10 Web服务创建SOAP标头

Web service operation setHeader with parameters {...} cannot be found.

当我倾倒的对象,我看到org.apache.axis2.client.Stub代替org.apache.axis.client.Stub。所以我的问题有两点:

  1. Axis2中的setHeader方法在哪里?
  2. 如果该方法不再可用,如何指定我的对象调用使用Axis1.x NOT Axis2?

我希望这是有道理的。

回答

0

How do I specify for my object call to use Axis1.x NOT Axis2

您可以随时切换回轴1,描述herehere。总结:

...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:

  1. Server level
    • New setting named wsversion in the CF WebServices Administration screen
  2. Application level (via the Application.cfc)
    • this.wssettings.version.publish = 1
    • this.wssettings.version.consume = 1
  3. Component level
    • For publishing <cfcomponent wsversion="1">
    • For consuming createObject("webservice", theURL, {wsversion="1"})