2012-09-19 82 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"})