[英]Why do I get “SOAP Response Version Mismatch”
Following is the flex code to import a csv data file via c# webservice. 以下是通过c#webservice导入csv数据文件的flex代码。
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");
}
and following is the c# webservice: 以下是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;
}
The application works fine on my development environment, whereas when I run it on the production server I get the following error message: 该应用程序在我的开发环境上运行良好,而当我在生产服务器上运行它时,出现以下错误消息:
[RPC Fault faultString="SOAP Response Version Mismatch" faultCode="DecodingError" faultDetail="null"] (404) [RPC Fault faultString =“ SOAP响应版本不匹配” faultCode =“ DecodingError” faultDetail =“ null”](404)
Development Environment is: Win7, MSSQL Server 2005, MS Visual Studio 2010, .NET Framework version 4.0.30319 开发环境为:Win7,MSSQL Server 2005,MS Visual Studio 2010,.NET Framework版本4.0.30319
Live Server: Win2008 Server, MSSQL Server 2005, IIS7, .NET Framework version 4.0.30319 Live Server:Win2008 Server,MSSQL Server 2005,IIS7,.NET Framework版本4.0.30319
Can anyone think of a reason regarding why I get the error message above on the live server? 谁能想到我在实时服务器上收到上述错误消息的原因?
Thanks. 谢谢。
I figured the problem. 我发现了问题。 The data file I was trying to import was of 7MB text file. 我尝试导入的数据文件为7MB文本文件。 I split it into 2 files and tried to import then it worked. 我将其拆分为2个文件,并尝试导入,然后它起作用了。 So the problem was the size of the data being transferred to the server. 因此,问题在于正在传输到服务器的数据大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.