Comments on: Magento API v2 SOAP demystified Magento Design and Magento Development Professionals - Inchoo Thu, 05 Mar 2015 06:08:34 +0000 hourly 1 By: Damu Fri, 26 Sep 2014 00:16:21 +0000 I am unable to pass params through api, call. works in local but not in live. cleared cache but still doesn’t work :(

$result = $cli->as400Index($sessionId, 'catalog_product_price_index_1,catalog_product_price_index_2', 'cp', 'fc');

any idea?

By: Alberto Fri, 27 Jun 2014 08:30:59 +0000 I’m trying to connect with magento allocated in a remote server using your instructions but I get Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘′ : failed to load external entity “″.
But when i try the same code on my local magento it’s work properly, and they have the same configuration, users and roles.

$api_url_v1 = “″;
$username = ‘appmkt';
$password = ‘mktapp2014′;
$cli = new SoapClient($api_url_v1);
//retreive session id from login
$session_id = $cli->login($username, $password);
//call customer.list method
$result = $cli->call($session_id, ‘customer.list’, array(array()));

Is there any special method to connect with magento in a remote server?


By: Dzurillo Tue, 27 May 2014 11:29:24 +0000 Hi!

What purpose of file api2.xml ?

Thank you.

By: Demasi Sun, 16 Feb 2014 12:46:37 +0000 Hi I am trying to use SOAP, however I am facing the following error:

API type “soap” is not supported

#0 /mnt/webapp/besttoys/besttoys/app/code/core/Mage/Api2/Model/Server.php(197): Mage_Api2_Model_Config->getRoutes(‘soap’) #1 /mnt/webapp/besttoys/besttoys/app/code/core/Mage/Api2/Model/Server.php(105): Mage_Api2_Model_Server->_route(Object(Mage_Api2_Model_Request)) #2 /mnt/webapp/besttoys/besttoys/api.php(69): Mage_Api2_Model_Server->run() #3 {main}

Could someone help me on it. I am

By: darshan Tue, 21 Jan 2014 10:48:10 +0000 Hi,

I dont want to load wsdl.xml file of Catalog and Sales module in my SOAP WSDL Url.

Hos can i do that?

By: vivek Sat, 21 Dec 2013 09:57:37 +0000 Hi,
Iam new to magneto can you please tell where i put SOAP connection file and the folder structure.

By: Bijal Tue, 12 Nov 2013 11:34:36 +0000 Hi,

I have to modify sales order info() method of API. I want’s to show street field values in two different fields street1 & street2.

Please have a look to this link which was posted by e for the same:

By: Mikaël DELSOL Fri, 18 Oct 2013 22:05:45 +0000 Learn more how to call the Magento SOAP API at

By: Victor Gardea Fri, 06 Sep 2013 22:06:03 +0000 Hi,

I have a cluster of servers (2 frontend, 1 database-write and 1 database-read) and I install the admin panel in the server of database-write with the domain name

But I can’t make the Web services works with the domain because Magento redirects everything to the domain

The admin panel works fine, but the Web services doesn’t works with the custom admin url.


By: priyanka Tue, 27 Aug 2013 13:26:13 +0000 Hi,
I’m new learner ,please help me how to enter magento login page directly from java code(step by step ).

By: Vasim Padhiyar Mon, 19 Aug 2013 05:49:05 +0000 session_start();
$host = ‘http://localhost/megento/api/v2_soap/?wsdl';
$api = ‘testkey';
$user = ‘test';
$client = new SoapClient($host);
$session = $client->login($user, $api);
$complexFilter = array(
‘complex_filter’ => array(
‘key’ => ‘type’,
‘value’ => array(‘key’ => ‘in’, ‘value’ => ‘simple’)
$SimpleProducts = $client->catalogProductList($session, $complexFilter);


Above php code is not working for me. The code is used to get list of simple products.
Any admin settting needed for that ? i have created user and assign role to it.
please help.

By: Shilpa Fri, 09 Aug 2013 06:29:29 +0000 Hi,
my page goes blank when i put wrong “magento go” url.i want to catch the error when url goes wrong. but due to blank and no response from server i cannot do so please tell me what should be my apporach

By: Bob Johnson Sun, 16 Jun 2013 18:29:11 +0000 Attached is an example set of code that is failing with the error “ Unknown error”.
MagentoService magentoV2 = new MagentoService();
MageApiModelServerWsiHandlerPortType portV2 = magentoV2.getMageApiModelServerWsiHandlerPort();
LoginParam loginParam = new LoginParam();
loginParam.setApiKey(new com.moment.connector.magento.soap.v2.String(“12341234″));
loginParam.setUsername(new com.moment.connector.magento.soap.v2.String(“testuser”));
LoginResponseParam loginResponse = portV2.login(loginParam);

com.moment.connector.magento.soap.v2.String sessionId = new com.moment.connector.magento.soap.v2.String(loginResponse.getResult().getValue());
com.moment.connector.magento.soap.v2.String storeId = new com.moment.connector.magento.soap.v2.String(“1″);

List calls = new ArrayList();
// Create the shopping cart
ShoppingCartCreateRequestParam shoppingCartCreateRequestParam = new ShoppingCartCreateRequestParam();

MultiCallParam multiCallParam = new MultiCallParam();
MultiCallResponseParam multiCallResponseParam;
try {
multiCallResponseParam = portV2.multiCall(multiCallParam);
System.out.println(“” + multiCallResponseParam.getResult());
} catch (Exception e) {

By: Bob Johnson Sun, 16 Jun 2013 18:25:46 +0000 I am trying to use the multicall option in the java soap v2 api. Any ideas how to make the calls to it? I am not finding anything online to give greater clarity as to the types of objects that will be sent to the server.

By: Abid Malik Sat, 13 Apr 2013 06:31:18 +0000 I got it working like this.

$cli = new SoapClient($api_url_v2);
$session_id = $cli->login(array('username'=>$username, 'apiKey'=>$password));
//retreive session id from login
$result = $cli->customerCustomerList(array('sessionId'=>$session_id));

but i am not able to print the customer list, neither is there any exception

By: David Mount Wed, 05 Dec 2012 03:19:10 +0000 I am trying to use Magento web services by posting SOAP_V2 XML. I’m having lots of success but one attribute that I receive, group_price, has a value of “array”. It’s not surprising to me that group_price is an array. But how can I specify in the XML that I want to retrieve the group_price for customer_group=4 ?

By: Victor Gardea Sun, 25 Nov 2012 18:43:43 +0000 Hi,

Im getting some troubles creating a custom methods in the SOAP Service of Magento, but this problems happens when the Page Cache is active, otherwise it works just fine, and when I activate the cache the connection with the web service displays an error that can’t find definitions in the wsdl.

I don’t know if having the Page Cache disable can damage the performance of my store.

By: Vikram Thu, 01 Nov 2012 10:08:18 +0000 Hi,

i am trying to use magento web service with java. Could you please help me with this?

By: narendra Wed, 03 Oct 2012 10:49:24 +0000 Hi Darko,
I stucked at one point while trying to create the webservice with reference of this post.

All the parameters are displaying in the WSDL file when its viewed from browser with the URL. I mean complextype, request/response param and request/response messages.

But my method is not being displayed when I make call to $cli->__getFunctions().

Can you please help what am I doing wrong?

By: Darko Goles Thu, 27 Sep 2012 07:08:55 +0000 @lance, it would be nice for you to try opening:
http://yourmagentoinstallation/api/v2_soap/?wsdl=1 in browser to see available methods …