不同格式的Axis SOAP响应是一样的吗?

问题描述:

我从不同的Magento安装得到两个不同的响应。他们认为是相同的,都应该工作,但第二个响应不能被我的Axis Java客户端应用程序解析。而且我不知道某些更新版本的Axis是否可以解析这两个版本。不同格式的Axis SOAP响应是一样的吗?

现在的问题是:从SOAP格式的视图应该这些两个响应很好地解析到相同的结果?

响应1:

 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" 
         xmlns:SOAP-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:Body> 
      <ns1:salesOrderListResponse> 
       <result SOAP-ENC:arrayType="ns1:salesOrderEntity[24]" xsi:type="ns1:salesOrderEntityArray"> 
        <item xsi:type="ns1:salesOrderEntity"> 
         <increment_id xsi:type="xsd:string">100000056-1</increment_id> 
         <parent_id xsi:type="xsd:string">0</parent_id> 
... 

响应2:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" 
        xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <SOAP-ENV:Body> 
     <ns1:salesOrderListResponse> 
      <result SOAP-ENC:arrayType="ns2:Map[30]" xsi:type="ns1:salesOrderEntityArray"> 
       <item xsi:type="ns2:Map"> 
        <item> 
         <key xsi:type="xsd:string">increment_id</key> 
         <value xsi:type="xsd:string">200000281</value> 
        </item> 
        <item> 
         <key xsi:type="xsd:string">parent_id</key> 
         <value xsi:type="xsd:string">0</value> 
        </item> 
... 

更新: 两个安装使用相同的Magento版本1.3.2.4。第二次安装运行PHP 5.2.13。它可能与PHP版本或安装的PHP soap框架有关吗?

当然,这是因为您的安装中使用的Soap框架。 请参阅Webserver requirements

顺便说一句,这是知道轴1.4有问题:

<value xsi:type="xsd:string">200000281</value> 

要在轴工作,它应该是:

<value xsi:type="soapenc:string">200000281</value> 

更多信息看here,看起来是你面对的同样的问题。

Here是一个线程,也许可以帮助你。