2010-06-11 107 views
1

我最近開發的Web服務存在問題。 問題是關於Web服務響應。更確切地說,有時Web服務發送回以下回應:Coldfusion Web服務響應問題

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <soapenv:Body> 
     <ns1:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest"> 
     <GetConstants2Return xsi:type="ns2:CFComponentSkeleton" xmlns:ns2="http://rpc.xml.coldfusion"/> 
     </ns1:GetConstants2Response> 
    </soapenv:Body> 
</soapenv:Envelope> 

不是正確的響應(有時顯示了在間歇的方式)以下報道:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <soapenv:Body> 
     <ns1:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest"> 
     <GetConstants2Return xsi:type="ns1:Constants2"> 
      <BooleanTypeFalse xsi:type="xsd:string">0</BooleanTypeFalse> 
      <BooleanTypeTrue xsi:type="xsd:string">1</BooleanTypeTrue> 
      <GenderFemale xsi:type="xsd:string">F</GenderFemale> 
      <GenderMale xsi:type="xsd:string">M</GenderMale> 
      <LanguageEnglish xsi:type="xsd:string">inglese</LanguageEnglish> 
      <LanguageItalian xsi:type="xsd:string">italiano</LanguageItalian> 
     </GetConstants2Return> 
     </ns1:GetConstants2Response> 
    </soapenv:Body> 
</soapenv:Envelope> 

在什麼地方CFCComponentSkeleton來自? 我提前感謝大家。

回答

2

這聽起來像也許是缺少的方法。當你點擊一個CFC並且不傳遞一個方法時,你會得到描述符 - 一個CFC方法的HTML視圖。當你在URL中使用?wsdl時,它應該發回WSDL。但也許有些事情正在阻礙。也許檢查你的Web服務器日誌,看看有沒有奇怪的東西在URL中傳遞。同時考慮在CFC中添加一些日誌記錄。

+0

我檢查了CF和Web服務器的日誌文件,但找不到任何有用的東西。的WS現在發送回從一個I以上報道的不同的反應: .... soapenv:Server.userException coldfusion.xml.rpc.CFCInvocationException: [java.lang.ClassCastException:usermanagerwstest.UserInfo2] .... UserInfo2是一個包含一些標記的cfc。 Ws安裝在許多服務器上,但引發ClassCastExcpetion的方法在每臺服務器上都不相同。 – 2010-06-21 10:03:31

+0

您是否在異常日誌中看到任何內容? – 2010-06-21 14:56:03