2

I added a service to my project in visual basic to connect to soap api of magento. The connection seems to work but in my wsdl I havn't got the handler Mage_Api_Model_Server_V2_Handler. So I can't use it.

<service name="MagentoService">
<port name="Port" binding="typens:Binding">
<soap:address location="http://example.com/index.php/api/v2_soap/index/"/></port></service>

What I wrong?

0

A library to help when working with .net and Magento's API:

Also be sure to enable WS-I compliance:

You may also want to try to disable WSDL Caching as well.

| improve this answer | |
  • It didn't solve my problem. I have port name without handler "Mage_Api_Model_Server_V2_Handler" – laura Apr 19 '16 at 10:48
0

I know this question is old, but today I went through this problem. I could not figure it out, but I got it fixed. I'll explain and maybe someone more experienced can understand what's going on.

in Mage_Api_Model_Server we have the following function:

public function run()
{
    $this->getAdapter()->run();
}

The return of this function is an instance of Mage_Api_Model_Server_V2_Adapter_Soap and if we debug it we will get the following result:

public function run()
{
    //$this->getAdapter()->run();
    echo $this->getAdapter()->getHandler();
}

output: 'Mage_Api_Model_Server_V2_Handler'

So far so good, but if we go in Mage_Api_Model_Server_V2_Adapter_Soap in the run() method and give an echo in $this->getHandler() we get a null return.

So, since getHandler does not work, in the _getWsdlConfig () method, I made a small change. not a solution, just could not find the root of the problem and that's how I found it to not break the API. If anyone knows the solution to the problem I am very grateful

app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php

protected function _getWsdlConfig()
{
    $wsdlConfig = Mage::getModel('api/wsdl_config');
    //$wsdlConfig->setHandler($this->getHandler());
    $wsdlConfig->setHandler($this->getHandler('Mage_Api_Model_Server_V2_Handler'))
        ->init();
    return $wsdlConfig;
}

Before they comment, I did not change the core. I rewrote the method

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.