I have SOAP wsdl from Magento and I have to get simple product list from it.
Logic is to get ‘simple’ products from catalogProductList.
So far in VS2015 I have create console app, and in reference add service reference, paste url of wsdl, but further I have no idea what to do, also didn’t find any similar examples.
In PHP code would be like this:
$proxy = new SoapClient('http://magentowebshop/api/v2_soap/?wsdl');
$sessionId = $proxy->login('user', 'pass');
$complexFilter = array(
'complex_filter' => array(
array(
'key' => 'type',
'value' => array('key' => 'in', 'value' => 'simple')
)
)
);
$result = $proxy->catalogProductList($sessionId, $complexFilter);
var_dump($result);
2
Answers
Ok i find a solution:
When you added the serviceReference it asked you to input a NameSpace
In your code use that namespace to create a client a be able to call the exposed methods of the WSDL
when you type
ServiceReference1.
you will see a list of the clients created based on the wsdl that you added.and then when you type
client.
you will see methods that you can get to achieve what you want