我正试图通过使用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>
标记。
关于如何修复的任何想法?
答案 0 :(得分:0)
发现问题:它位于magento连接器文件的magento_v2_soap.wsdl中catalogProductInfoRequest
<part name="product" type="xsd:string"/>
需要更改为<part name="productId" type="xsd:string"/>
我已经制作了更改gitHub但我没有写访问权限...所以我做的是我将更改下载并安装在mule中。