Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problem with XMLRPC API
 
spdaly
Jr. Member
 
Total Posts:  14
Joined:  2008-07-14
Cincinnati, OH
 

Hello all,

I’m trying to do a proof of concept of integration with Magento via the XMLRPC API.  I can’t seem to work out the calling signatures.

Here’s my code:

<?php
require_once 'xmlrpc.php';

define("XMLRPC_DEBUG"1);

$result XMLRPC_request('localhost''/api/xmlrpc''login', array('aplus''aplusintegration'), NULL);

$session $result[1];

$result XMLRPC_request('localhost''/api/xmlrpc''resources'$sessionNULL);

$result XMLRPC_request('localhost''/api/xmlrpc''call', array($session'customer.info'176), NULL);

//$result = XMLRPC_request('localhost', '/api/xmlrpc', 'call', array($session, 'sales_order.info', '100000020'), NULL);

print_r($result);

XMLRPC_debug_print();
?>

This returns:

array(2{
  [0]
=>
  
bool(false)
  
[1]=>
  array(
2{
    [
"faultCode"]=>
    &
int;(623)
    
["faultString"]=>
    &
string;(41"Calling parameters do not match signature"
  
}
}

I’m prototyping in PHP and the app will be in Java.  I get the same results using the Apache XMLRPC lib in my Java app.

I have confirmed that my “aplus” user has a role called “all” that has access to all of the methods.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SilverFoxUnlimited
Jr. Member
 
Total Posts:  21
Joined:  2008-09-28
Rochester, NY
 

I am trying the plugin MagentoXtender and my server attempts to throw the same error.  The only difference for me is that it throws an uncaught exception trying to give the error.  My phpinfo can be found at http://www.silverfoxunlimited.com/phpinfo.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dunc-IT
Jr. Member
 
Total Posts:  15
Joined:  2009-08-05
 

Did you get this resolved?  I didn’t have any problem with the sales_order.info, but product_stock.update throws the error no matter what I try to pass it.  Eg.

my $server XML::RPC->new($site '/api/xmlrpc/');
my $sessionID $server->call("login", ($user$key));
print 
Dumper($sessionID);

$invRet $server->call("call", ($sessionID'cataloginventory_stock_item.update''sku' => $sku, ('qty' => 100'is_in_stock' => 1)));
print 
Dumper($invRet), "\n";

The update returns:

$VAR1 = {
‘faultString’ => ‘Calling parameters do not match signature’,
‘faultCode’ => ‘623’
};

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top