2010-02-19 55 views
1

我無法使Web服務在ColdFusion中正常工作。這在我的開發服務器上工作得很好,但是當我將它交給QA時,他們在他們的服務器上收到了這個錯誤。兩者都運行ColdFusion 8.0.1.195765。是否有一些系統設置我錯過了會導致此行爲?ColdFusion無法生成WSDL

我很簡單的CFC文件:

<cfcomponent output="false"> 

    <cffunction name="Test" access="remote" returntype="any"> 
    <cfreturn /> 
    </cffunction> 

</cfcomponent> 

當我去http://www.example.com/zSoapTest.cfc?wsdl我得到以下錯誤:

 
AXIS error 

Could not generate WSDL! 

There is no SOAP service at this location 

Fault - The AXIS engine could not find a target service to invoke! targetService is null 

AxisFault 
faultCode: {http://xml.apache.org/axis/}Server.NoService 
faultSubcode: 
faultString: The AXIS engine could not find a target service to invoke! targetService is null 
faultActor: 
faultNode: 
    {http://xml.apache.org/axis/}stackTrace:The AXIS engine could not find a target service to invoke! targetService is null 
    at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:475) 
    at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     ... 

我已經做了一些網絡搜索,發現this method to flush the web services cache,但是那並不是」爲我工作。我認爲它甚至沒有WSDL的緩存,我認爲它在這之前是失敗的。

回答

2

我剛剛在我的ColdFusion 8(8,0,1,195765)和ColdFusion 9上試過了你的cfc,並正確地返回了wdsl定義。

我會建議檢查QA服務器是否正確設置,並且目標服務定義尚未被刪除/損壞/更改。這篇文章可以幫助http://kb2.adobe.com/cps/182/tn_18271.html

+1

謝謝,最終讓我找到了解決辦法:在C:\ ColdFusion8 \ wwwroot \ WEB-INF中缺少'client-config.wsdd'和'server-config.wsdd'文件。我仍然不確定爲什麼這些文件丟失。 – Kip 2010-02-19 21:42:33

0

我也有類似的問題,我發現

如果您正在使用JRUN,那麼你還需要編輯 C:\ ColdFusion8 \ wwwroot的\ WEB-INF \ JRUN -web.xml

改變

<enable-jrun-web-services>FALSE<enable-jrun-web-services> 

<enable-jrun-web-services>TRUE<enable-jrun-web-services>