Magento API
Copy link to clipboard
Copied
Hi,
I have Problems with the API and coldfusion. I created a User in the Magento,add a role (full access). Via API, i can login ask for globalFaults,resources (List), end Session but i can't make a "call". The Errormessage is always "Web service operation call with parameters {f81d16872c0f408a9d09753c8900f129,product.list} cannot be found."
Do you know something about this problem?
I tested the API via PHP, and id works well.
The code of the login (it works correctly and gives me back a sessionID):
<cfset magento = CreateObject("webservice", this.url)/>
<cfset magentoSession = magento.login("#this.benutzer#", "#this.passwort#")>
The code of the call:
<cfset productArray = magento.call("#magentoSession#", "product.list")>
<cfdump var="#productArray#">
Regards,
Adrian
Copy link to clipboard
Copied
Adrian, I know it's been a while on this, but did you ever get it resolved. If so, how?
Copy link to clipboard
Copied
This question is obviously very old, but still comes up high in the SERPs...
This looks to me like a problem with optional parameters... in that, CF expects them even if they're optional.
There's some details about this problem and how to get around it here:
http://www.talkingtree.com/blog/index.cfm/2006/7/12/cfinvokeargument-omit-attr
TL:DR - the product.list call expects 'filters' and 'storeid', and if you don't want to pass them in the call you can either use <cfinvokeargument name="filters" omit="true">
or since you're using CreateObject in your example, you can pass a null value:
javacast("null", "")
I've had similar problems with the Magento API through ColdFusion - this got me back on track.

