Error during assigning product image through soap api Magento -



Error during assigning product image through soap api Magento -

hi have start learning soap api in magento . in have create product through soap , want assign product images through it. using below code

<?php $client = new soapclient('http://localhost/magento1.9/index.php/api/v2_soap/?wsdl'); $session = $client->login('111111', '111111'); $newimage = array( 'file' => array( 'name' => 'file_name', 'content' => base64_encode(file_get_contents('heart_circle.png')), 'mime' => 'image/jpeg' ), 'label' => 'cool image through soap', 'position' => 2, 'types' => array('small_image'), 'exclude' => 0 ); $imagefilename = $client->call($session, 'product_media.create', array('product_sku', $newimage)); var_dump($imagefilename); ?>

but getting below error fatal error: uncaught soapfault exception: [client] function ("call") not valid method service in /var/www/soap.php:19 stack trace: #0 /var/www/soap.php(19): soapclient->__call('call', array) #1 /var/www/soap.php(19): soapclient->call('92b56ed9ed1c9b5...', 'product_media.c...', array) #2 {main} thrown in /var/www/soap.php on line 19

please suggest me doing mistake. thanks

hi have found issue wrong soap version mention in url

http://localhost/magento1.9/index.php/api/v2_soap/?wsdl //previous http://localhost/magento1.9/index.php/api/soap/?wsdl // new

thanks

magento soap error-handling media product

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -