在客户列表SOAP响应中获取无效的XML

时间:2016-01-07 14:40:48

标签: xml magento soap magento-1.8

我在SOAP调用的Magento XML响应中遇到了一个奇怪的问题。我正在使用Magento 1.8.1。当我通过customerCustomerList调用获取客户列表时,我收到以下无效的XML响应(见下文)

此行为是随机的,一天发生一次或两次,除了此相同的API调用在大多数情况下运行良好。有时似乎无效的XML是由密码哈希导致的,有时候如下(无效或不完整的XML节点):

请求:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body>
<urn:customerCustomerList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sessionId xmlns:xs="http://www.w3.org/2000/XMLSchema-instance" xsi:type="xsd:string" xs:type="type:string">5bff6fb17eba1277154ec09885b45746</sessionId>
<filters xmlns:xs="http://www.w3.org/2000/XMLSchema-instance" xsi:type="urn:filters" xs:type="type:filters">
<filter>
<associativeEntity>
<key xs:type="type:string">email</key>
<value xs:type="type:string">zahmed@folio3.com</value>
</associativeEntity>
</filter>
</filters>
</urn:customerCustomerList>
</soapenv:Body>
</soapenv:Envelope>

响应:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlnsSmiley FrustratedOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:customerCustomerListResponse>
<storeView SOAP-ENC:arrayType="ns1:customerCustomerEntity[1]" xsi:type="ns1:customerCustomerEntityArray">
<item xsi:type="ns1:customerCustomerEntity">
<customer_id xsi:type="xsd:int">321</customer_id>
<created_at xsi:type="xsd:string">2015-02-24 12:16:11</created_at>
<updated_at xsi:type="xsd:string">2015-03-11 12:14:15</updated_at>
<store_id xsi:type="xsd:int">1</store_id>
<website_id xsi:type="xsd:int">1</website_id>
<created_in xsi:type="xsd:string">Default Store View</created_in>
<email xsi:type="xsd:string">zahmed@folio3.com</email>
<firstname xsi:type="xsd:string">Zeeshan</firstname>
<lastname xsi:type="xsd:string">Ahmed</lastname>
<group_id xsi:type="xsd:int">0</group_id>
</item>
/storeView>
</p_id xsi:type="xsd:int">0
</group_id>
<5>/ENV:Body>
<ns1:c/ENV:Envelope xmln

如果有人遇到过这个问题。请让我知道如何摆脱这个。

0 个答案:

没有答案
相关问题