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

Programming Magento with SOAP and c#
 
PrzemekKompix
Jr. Member
 
Total Posts:  2
Joined:  2012-10-08
 

Hello
I’m trying to program Magento from c#.
In the first step I added Service Reference to project in Visual Studio. But I don’t have MagentoService Class. I have it when I download file and convert it by wsdl.exe from Visual Studio Command Line.
So, in the case with service reference, my code looks like this:

MagentoSer.Mage_Api_Model_Server_HandlerPortTypeClient client = new MagentoSer.Mage_Api_Model_Server_HandlerPortTypeClient();
var 
sesja client.login("id""password");
client.call(sesja"catalog_category.tree"null);
client.endSession(sesja);
everything works all right.
But when I’m trying to use
MagentoSer.Mage_Api_Model_Server_HandlerPortTypeClient client = new MagentoSer.Mage_Api_Model_Server_HandlerPortTypeClient();
var 
sesja client.login("id""password");
client.call(sesja"product_stock.list""qqaz");
client.endSession(sesja);
Exception occurs “Error in deserializing body of reply message for operation ‘call’”
The specified type was not recognized: name=’Map’, namespace=’http://xml.apache.org/xml-soap’, at <callReturn xmlns=’’>."}
When testing from PHP everything works ok.

I have found this two articles
http://codeblow.com/questions/php-web-service-in-c-invoke-function-returns-null/
http://stackoverflow.com/questions/733303/php-web-service-in-c-sharp-invoke-function-returns-null
but I can’t catch the big picture.

Are those about object args in

public object call(string sessionIdstring resourcePathobject args);
or about output from function?

And one more thing. When searching the Web I have found example of code (Magneto help) where strange arrays are used (like complexFilter). How Can I get them if I connect to wsdl file via Visual Studio? Is this in Magento Administrator rights to expose them to me?

Best Regards
Przemysław Staniszewski

 
Magento Community Magento Community
Magento Community
Magento Community
 
PrzemekKompix
Jr. Member
 
Total Posts:  2
Joined:  2012-10-08
 

Soultion is in one of comments http://stackoverflow.com/questions/12933474/programming-magento-with-soap-and-c-sharp.

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