gpt4 book ai didi

ios - 使用 magento SOAP API 的 multicall 方法的正确方法是什么?

转载 作者:行者123 更新时间:2023-11-29 10:51:28 25 4
gpt4 key购买 nike

我已经实现了两种调用 magento 方法的方法,首先是 http://sudzc.com/类(class)和第二名 http://www.wsdl2code.com/Pages/Home.aspx类。但无法通过任何一种方式获取产品信息。

请检查多调用方法的两对请求和响应:-

苏维埃

请求:-

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<multiCall>
<sessionId>b543e92c12944a5512c624a4944423d8</sessionId>
<calls>(
"catalog_product.info"
)</calls>
<options>(
productId,
5
)</options>
</multiCall>
</soap:Body>
</soap:Envelope>

回应:-

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:Magento" 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:multiCallResponse>
<multiCallReturn SOAP-ENC:arrayType="xsd:ur-type[0]" xsi:type="ns1:FixedArray" />
</ns1:multiCallResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Wsdl2code(我认为这里的 SOAP 信封有问题,因为里面没有指定参数,让我知道如何更正它)

要求:-

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<multiCall xmlns="urn:Magento">
<sessionId>b543e92c12944a5512c624a4944423d8</sessionId>
<calls>
<MagentoService>
<SoapVersion>Default</SoapVersion>
<AllowAutoRedirect>0</AllowAutoRedirect>
<EnableDecompression>0</EnableDecompression>
<UnsafeAuthenticatedConnectionSharing>0</UnsafeAuthenticatedConnectionSharing>
<UseDefaultCredentials>0</UseDefaultCredentials>
<PreAuthenticate>0</PreAuthenticate>
<Url>http://mediaplus.co.za/api/soap/?wsdl/multiCall</Url>
<Timeout>0</Timeout>
</MagentoService>
</calls>
</multiCall>
</soap:Body>
</soap:Envelope>

回应:-

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Cannot use object of type stdClass as array</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

最佳答案

经过大量谷歌搜索后,我设法通过查看 this post 解决了这个问题。 .它有一个示例项目。

关于ios - 使用 magento SOAP API 的 multicall 方法的正确方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20260570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com