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

[How to] Import datas from a webservices (soap) into the Magento database
 
donald_duck
Jr. Member
 
Total Posts:  3
Joined:  2008-08-04
 

Hi everyone,

I’m a beginner with Magento and I’ve heard of the Magento DataFlow framework.
I see very well how to do if I want to import datas from a cvs and xls, but my problem is that I want import from an external datas warehouse via a webservice.

Because DataFlow is a framework, and because i think it doesn’t exist, for the moment, any “tools” which does it, I suppose that I need to develop my own classes (I mean adapter etc..)

However, there isn’t much documentation about Magento DataFlow (Or I didn’t seek very well), so I don’t know how starting.
Maybe I just need to configure an Action XML, I don’t know.

Thanks for the help

 
Magento Community Magento Community
Magento Community
Magento Community
 
biondo
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-07-24
Italy
 
donald_duck - 05 August 2008 07:02 AM

However, there isn’t much documentation about Magento DataFlow (Or I didn’t seek very well), so I don’t know how starting.

You can start from here: http://www.magentocommerce.com/support/magento_core_api

bye

 
Magento Community Magento Community
Magento Community
Magento Community
 
donald_duck
Jr. Member
 
Total Posts:  3
Joined:  2008-08-04
 

Thank you for your answer.

Yes, of course it’s a good documentation to use the soap server in magento.
But in my case I need an adapter for a client.
You see, I already have two soap server running, and I to planify (via DataFlow?) an import of a list of products get by a distant webservice into the local database (Using the core API to insert those products… why not)

To clarify:
Do:

$client = new SoapClient('http://magentohost/api/soap/?wsdl');
Is a basic code to create a soapclient. You can easily export this code into another website or else.

I need to do, things like this:

$client_mangento = new SoapClient('http://magentohost/api/soap/?wsdl');
$client_distant =  new SoapClient('http://distant/?wsdl');

$productList $client_distant->getProduct();

foreach (
$productList as $product{
    $newProductData 
= array(
          
'name'              => $product['name'],
          
'websites'          => array('base'),
          
'short_description' => $product['short'],
          
'description'       => $product['description'],
          
'price'             => $product['price']
     
);

     
$client_magento->call(<sessionId>, 'product.create', array('simple', <id>, <sku>, $newProductData));
}
And I need to call this in the Magento system->Import/export menu.
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top