Im trying to connect to the Magento 1.4.0.1 API, but until now I have no luck.
I have added a Service Reference
named MagentoAPI
and pointed it to http://mydomain.com/api/v2_soap?wsdl=1
(I know the =1
is not intended, but it dont work without)
This works fine, I get a list of all available methods, but when I try to use any of them it dont work.
using Magento_Import.MagentoAPI;
namespace Magento_Import
{
public partial class _Default : System.Web.UI.Page
{
Mage_Api_Model_Server_V2_HandlerPortType handler;
protected void Page_Load(object sender, EventArgs e)
{
string session = handler.login("username", "password");
}
}
}
That is how I initialize the web service, but when I debug the code the handler
is null
.
What am I doing wrong?