gpt4 book ai didi

java - Magento catalogProductInfo - 访问因未知原因被拒绝

转载 作者:行者123 更新时间:2023-11-30 11:58:19 26 4
gpt4 key购买 nike

当我向 Magento 提出以下请求时,访问被拒绝:

<?xml version="1.0" encoding="UTF-8"?>
<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 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:Magento">
<sessionId xsi:type="xsd:string">xxxxxxxxxxxxxxx</sessionId>
<productId xsi:type="xsd:string">119</productId>
<storeView xsi:type="xsd:string" xsi:nil="true"/>
<attributes xsi:type="ns1:catalogProductRequestAttributes" xsi:nil="true"/>
</ns1:catalogProductInfo>
</soapenv:Body>
</soapenv:Envelope>

这是响应:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>2</faultcode>
<faultstring>Access denied.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

session ID 正确,我可以执行其他请求,但 catalogProductInfo 失败了。我正在使用 Java 和 Axis 1.4 访问 Magento。

最佳答案

实际原因是使用没有任何产品访问权限的角色访问 API。

您应该为访问此 API 的用户角色启用产品访问权限。

关于java - Magento catalogProductInfo - 访问因未知原因被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3236393/

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