Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iphone xml解析错误_Iphone_Objective C_Xml_Nsxmlparser - Fatal编程技术网

iphone xml解析错误

iphone xml解析错误,iphone,objective-c,xml,nsxmlparser,Iphone,Objective C,Xml,Nsxmlparser,Hello all在我的iphone应用程序中发送登录xml请求后,我收到以下错误的xml。。。但是我不明白错误是什么 <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/en

Hello all在我的iphone应用程序中发送登录xml请求后,我收到以下错误的xml。。。但是我不明白错误是什么

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  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:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">error in msg parsing:
Charset from HTTP Content-Type &apos;UTF-8&apos; does not match encoding from XML declaration &apos;ISO-8859-1&apos;</faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

消息解析中的SOAP-ENV:Clienterror:
HTTP内容类型中的字符集&apos;UTF-8&apos;与XML声明中的编码不匹配&apos;ISO-8859-1&apos;

好的,错误消息是,您试图解析一个文档,其中文档头说它是在ISO 8859/1中编码的,而HTTP头说它是在UTF-8中编码的。解析器可以通过赋予HTTP头优先级来解决该冲突,但似乎这个解析器选择了不这样做。不一致性意味着存在某种配置问题,需要对其进行调查。

+1对于您来说,由于编码不匹配,XML标头中应该有UTF-8编码,因为Objective-c认识到这一点。。。。