我正在开发一个项目,使用C#[MVC4.5]从Magento的网站[V1.5.1]下载顺序列表,我开始之前,我从建造WWW服务器开发服务器副本积分文件,和我的程序运行得很好的dev的server.After的是,我改变了web服务参考[ http://dev.example.com/index.php/api/v2_soap/?wsdl]至[ http://www.example.com/index.php/api ?/ v2_soap / WSDL],然后我得到如下的错误消息:
在“/”应用程序的服务器错误。
内容类型文本/ XML; 字符集= UTF-8,文本/ XML; 字符集= UTF-8的响应消息不匹配的结合的内容的类型(文本/ XML;字符集= UTF-8)。 如果使用自定义的编码器,确保IsContentTypeSupported方法正确实施。 第一566个字节的响应是:“?XML版本= ”1.0“ 编码= ”UTF-8“SOAP-ENV”?“:信封的xmlns:SOAP-ENV =”http://schemas.xmlsoap.org/soap /信封/ “的xmlns:NS1 = ”瓮:Magento的“ 的xmlns:XSD = ”http://www.w3.org/2001/XMLSchema“ 的xmlns:的xsi =” http://www.w3.org/2001/XMLSchema -instance”的xmlns:SOAP-ENC = “http://schemas.xmlsoap.org/soap/encoding/” SOAP-ENV:的encodingStyle = “http://schemas.xmlsoap.org/soap/encoding/”“”SOAP -Env:身体“,”NS1:startSessionResponse“”startSessionReturn的xsi:type = “XSD:字符串”“fe4d182c95add56efba2191ed9d4dddb”/ startSessionReturn>“/ NS1:startSessionResponse> </ SOAP-ENV:身体”“/ SOAP-ENV:信封”
这里是响应头信息:
WWW Server
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?RTpcTkVUNC41XFByb2R1Y2VNYW5hZ2VtZW50XFByb2R1Y2VNYW5hZ2VtZW50?=
X-Powered-By: ASP.NET
Date: Mon, 16 Dec 2013 17:09:20 GMT
Content-Length: 17079
Develop Server:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/8.0## Heading ##
Set-Cookie: .ASPXAUTH=********; path=/; HttpOnly
X-AspNetMvc-Version: 4.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?RTpcTkVUNC41XFByb2R1Y2VNYW5hZ2VtZW50XFByb2R1Y2VNYW5hZ2VtZW50?=
X-Powered-By: ASP.NET
Date: Mon, 16 Dec 2013 17:29:36 GMT
Content-Length: 3789
By the way,i tried to change php file Soap.php:
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset, true);
but didn't work for me .....
我很感激,如果有人能帮助,谢谢....