0
以下是通過c#webservice導入csv數據文件的flex代碼。爲什麼我得到「SOAP響應版本不匹配」
private function Import():void{
CursorManager.setBusyCursor();
var op:Operation = Operation(_webservice.getOperation('ImportData'));
op.addEventListener(FaultEvent.FAULT,operationFault);
op.addEventListener(ResultEvent.RESULT,operationResult);
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(objectToXML(datasource.source).toXMLString());
op.arguments = new Array(filename, ba);
op.send();
}
protected function operationFault(e:FaultEvent):void
{
CursorManager.removeBusyCursor();
Alert.show(e.fault + " (" + e.statusCode + ")");
}
protected function operationResult(e:ResultEvent):void
{
datasource.removeAll();
CursorManager.removeBusyCursor();
Alert.show("Success");
}
及以下爲C#web服務:
[WebMethod]
public XmlDocument ImportData(String filename, byte[] data)
{
Boolean bReturn = false;
/* .... code to import data .... */
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml("<response>" + (bReturn ? "true" : "false") + "</response>");
conn.Close();
return xmlDoc;
}
應用程序工作正常在我的開發環境,而當我在生產服務器我收到以下錯誤消息上運行它:
[RPC Fault faultString =「SOAP Response Version Mismatch」 faultCode =「DecodingError」faultDetail =「null」](404)
開發環境是: Win7的,MSSQL Server 2005中,微軟的Visual Studio 2010中,.NET Framework版本4.0.30319
Live服務器: 的Win2008服務器,MSSQL Server 2005中,IIS7,.NET Framework版本4.0。 30319
任何人都可以想到爲什麼我在活服務器上獲得錯誤消息的原因嗎?
謝謝。