首页 文章

通过SOAP-API V2从Magento获取AttributeOptions

提问于
浏览
0

我正在尝试通过SOAP API获取特定产品属性的选项列表 .

使用Magento 1.6.2.0和WS-I兼容的SOAP API V2与.NET

电话是

client.catalogProductAttributeOptions(sessionId, attribute.attribute_id, storeView);

要获取属性id,我将获得具有属性代码的属性 . 我传递了当前的sessionId属性attribute_id和storeView .

有趣的是,在一个magento安装它工作正常,我得到所有选项 . 但在其他类似的安装上,我得到了以下FaultException:

服务器堆栈跟踪:System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime操作,ProxyRpc和rpc)在System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object []在Service.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)的System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)异常重新抛出[0]:在System.Runtime.Remoting处的out,TimeSpan超时) . 位于MagentoService.Mage_Api_Model_Server_Wsi_HandlerPortType.catalogProductAttributeOptions(catalogProductAttributeOptionsRequest请求)的System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData,Int32类型)中的Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)

编辑:

我自己制作的一个安装,这是我从中创建.NET代理的地方 . 这里工作正常 . 另一个安装是相同的magento版本,但安装在另一台机器上 . 此外,还安装了NETZKOLLEKTIV的Core API Extensions . 每个安装在其目录中都有不同的产品和类别 . 这有什么不同吗?两者都设置为符合WS-I .

如果有人能给我一些提示,那会很棒 . 谢谢

1 回答

  • 0

    提到的FaultException简单地说,与Magento Web服务器的API连接正在超时 . 在此Magento安装中,可能由于该特定属性的一长列属性选项而发生 .

    尝试增加Magento管理面板中的“ Client Session Timeout (sec.) ”值,来自: -

    • 系统

    • 配置

    • "Magento Core API"小组

    • "General Settings"标签

    希望能帮助到你 .

相关问题