Comments on: Magento API v2 SOAP demystified http://inchoo.net/magento/magento-v2-soap-demystified/ Magento Design and Magento Development Professionals - Inchoo Thu, 30 Oct 2014 04:58:38 +0000 hourly 1 http://wordpress.org/?v=4.0 By: Damu http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-428974 Fri, 26 Sep 2014 00:16:21 +0000 http://inchoo.net/?p=13588#comment-428974 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-174181 Fri, 27 Jun 2014 08:30:59 +0000 http://inchoo.net/?p=13588#comment-174181 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 ‘http://www.prueba.com/api/soap/?wsdl=1′ : failed to load external entity “http://www.prueba.com/index.php/api/soap/index/?wsdl=1″.
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 = “http://www.prueba.com/index.php/api/soap/?wsdl=1″;
$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?

Thanks.

]]>
By: Dzurillo http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-83210 Tue, 27 May 2014 11:29:24 +0000 http://inchoo.net/?p=13588#comment-83210 Hi!

What purpose of file api2.xml ?

Thank you.

]]>
By: Demasi http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-67249 Sun, 16 Feb 2014 12:46:37 +0000 http://inchoo.net/?p=13588#comment-67249 Hi I am trying to use SOAP, however I am facing the following error:

400
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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-66835 Tue, 21 Jan 2014 10:48:10 +0000 http://inchoo.net/?p=13588#comment-66835 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-65526 Sat, 21 Dec 2013 09:57:37 +0000 http://inchoo.net/?p=13588#comment-65526 Hi,
Iam new to magneto can you please tell where i put SOAP connection file and the folder structure.

]]>
By: Bijal http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-58840 Tue, 12 Nov 2013 11:34:36 +0000 http://inchoo.net/?p=13588#comment-58840 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: http://magento.stackexchange.com/questions/10683/magento-soap-api-needs-to-delimit-street-1-and-street-2-in-sales-order

]]>
By: Mikaël DELSOL http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-56640 Fri, 18 Oct 2013 22:05:45 +0000 http://inchoo.net/?p=13588#comment-56640 Learn more how to call the Magento SOAP API at https://www.wsdltophp.com/Blog/Use-WsdlToPhp-to-manage-your-Magento-website-with-its-SOAP-API

]]>
By: Victor Gardea http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-54447 Fri, 06 Sep 2013 22:06:03 +0000 http://inchoo.net/?p=13588#comment-54447 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 http://backend.innovasport.com.

But I can’t make the Web services works with the domain http://backend.innovasport.com because Magento redirects everything to the domain http://www.innovasport.com

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

Thanks.

]]>
By: priyanka http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-54138 Tue, 27 Aug 2013 13:26:13 +0000 http://inchoo.net/?p=13588#comment-54138 Hi,
I’m new learner ,please help me how to enter magento login page directly from java code(step by step ).

]]>
By: Vasim Padhiyar http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-53962 Mon, 19 Aug 2013 05:49:05 +0000 http://inchoo.net/?p=13588#comment-53962 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(
array(
‘key’ => ‘type’,
‘value’ => array(‘key’ => ‘in’, ‘value’ => ‘simple’)
)
)
);
$SimpleProducts = $client->catalogProductList($session, $complexFilter);

print_r($SimpleProducts);

=================
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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-53790 Fri, 09 Aug 2013 06:29:29 +0000 http://inchoo.net/?p=13588#comment-53790 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
thanks,
Shilpa

]]>
By: Bob Johnson http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-52411 Sun, 16 Jun 2013 18:29:11 +0000 http://inchoo.net/?p=13588#comment-52411 Attached is an example set of code that is failing with the error “javax.xml.ws.soap.SOAPFaultException: 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();
shoppingCartCreateRequestParam.setSessionId(sessionId);
shoppingCartCreateRequestParam.setStore(storeId);
calls.add(shoppingCartCreateRequestParam);
calls.add(shoppingCartCreateRequestParam);
calls.add(shoppingCartCreateRequestParam);

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

]]>
By: Bob Johnson http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-52410 Sun, 16 Jun 2013 18:25:46 +0000 http://inchoo.net/?p=13588#comment-52410 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-45153 Sat, 13 Apr 2013 06:31:18 +0000 http://inchoo.net/?p=13588#comment-45153 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-35896 Wed, 05 Dec 2012 03:19:10 +0000 http://inchoo.net/?p=13588#comment-35896 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-35614 Sun, 25 Nov 2012 18:43:43 +0000 http://inchoo.net/?p=13588#comment-35614 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-35081 Thu, 01 Nov 2012 10:08:18 +0000 http://inchoo.net/?p=13588#comment-35081 Hi,

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

]]>
By: narendra http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-33815 Wed, 03 Oct 2012 10:49:24 +0000 http://inchoo.net/?p=13588#comment-33815 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 http://inchoo.net/magento/magento-v2-soap-demystified/comment-page-1/#comment-33518 Thu, 27 Sep 2012 07:08:55 +0000 http://inchoo.net/?p=13588#comment-33518 @lance, it would be nice for you to try opening:
http://yourmagentoinstallation/api/v2_soap/?wsdl=1 in browser to see available methods …

]]>