Magento tiene una API y parece que algunas personas la están utilizando a través de VB.NET pero no puedo hacer que funcione después de intentar durante muchas horas.Cómo llamar a la API de Magento desde VB.NET
Estoy en Magento 1.7.0.2 Intentando que una aplicación VB.NET funcione con la API. Estoy usando la configuración del servicio web compatible con WS-I.
Error 1 Custom tool error: Unable to import WebService/Schema. Unable to import binding ‘Mage_Api_Model_Server_Wsi_HandlerBinding’ from namespace ‘urn:Magento’. The operation ‘catalogProductAttributeRemove’ on portType ‘Mage_Api_Model_Server_Wsi_HandlerPortType’ from namespace ‘urn:Magento’ had the following syntax error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section. d:\Documents\Visual Studio 2010\Projects\Mage\Mage\My Project\Settings.settings 1 1 Mage
si trato de agregarlo como una referencia de servicio (en lugar de una referencia web) me sale un conjunto diferente de errores.
no puede importar WSDL: unión no puede importar WSDL: puerto No se puede importar WSDL: portType
Error 5 Custom tool error: Failed to generate code for the service reference ‘ServiceReference1’. Please check other error and warning messages for details. d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage
Warning 3 Custom tool warning: Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:portType[@name=’Mage_Api_Model_Server_Wsi_HandlerPortType’] XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:binding[@name=’Mage_Api_Model_Server_Wsi_HandlerBinding’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage
Warning 4 Custom tool warning: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:binding[@name=’Mage_Api_Model_Server_Wsi_HandlerBinding’] XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:service[@name=’MagentoService’]/wsdl:port[@name=’Mage_Api_Model_Server_Wsi_HandlerPort’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage
Warning 2 Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: Element message named catalogProductAttributeRemoveRequest from namespace urn:Magento is missing. XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:portType[@name=’Mage_Api_Model_Server_Wsi_HandlerPortType’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage
alguien puede darme muy explícita instrucción/código de como hacer una llamada y obtener un resultado? Ni siquiera puedo parecer que la configuración inicial sea correcta. He descargado un código que otros han proporcionado en línea, pero si no funciona, probablemente porque era para una versión anterior.
¿Puedes ver el servicio web en el navegador? – Kiddo
sí, tengo un sitio de prueba aquí: http://testshop.tokyorealtime.com/api/v2_soap?wsdl=1 Creo que algo podría estar mal con el API XML, o algo incompatible con .NET, sin embargo, parece que otras personas han logrado hacerlo funcionar. –