0

我正在尝试使用 GET-PRODUCT OPERATION 通过 mule 中的磁电机连接器从磁电机获取产品信息,但我收到此错误:Product not exists即使通过 SOAP UI 测试并且运行良好。经过长时间的搜索,我发现了问题:

  • 通过 SOAP UI 请求:

    <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:catalogProductInfo soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <sessionId xsi:type="xsd:string"/>
             <productId xsi:type="xsd:string"/>
             <storeView xsi:type="xsd:string"></storeView>
             <attributes xsi:type="urn:catalogProductRequestAttributes">
                <attributes xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
                 </attributes>
             <additional_attributes xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
                </additional_attributes>
             </attributes>
             <identifierType xsi:type="xsd:string"/>
         </urn:catalogProductInfo>
      </soapenv:Body>
    </soapenv:Envelope>
    
  • 通过磁连接器请求:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
          <ns1:catalogProductInfo xmlns:ns1="urn:Magento" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <sessionId xsi:type="xsd:string"></sessionId>
             <product xsi:type="xsd:string"></product>
             <storeView xsi:type="xsd:string" xsi:nil="true"/>
             <attributes href="#id0"/>
             <productIdentifierType xsi:type="xsd:string"></productIdentifierType>
         </ns1:catalogProductInfo>
       <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:Magento" id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:catalogProductRequestAttributes">
        <attributes soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
         <attributes xsi:type="xsd:string"></attributes>
        </attributes>
        <additional_attributes soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array"/>
      </multiRef>
     </soapenv:Body>
    </soapenv:Envelope>
    

区别在于<product>/<productId>标签。

关于如何解决的任何想法?

4

1 回答 1

0

发现了问题:它在 magento 连接器文件的 magento_v2_soap.wsdl 中,在catalogProductInfoRequest需要<part name="product" type="xsd:string"/>更改的地方<part name="productId" type="xsd:string"/>我已经在 gitHub中进行了更改,但我没有写访问权限......所以我所做的是我做了更改下载并安装在 mule 中。

于 2015-12-31T09:54:00.997 回答