Skip to main content
Participant
November 18, 2011
Question

Magento API

  • November 18, 2011
  • 2 replies
  • 1304 views

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

This topic has been closed for replies.

2 replies

Gary Stanton
Participating Frequently
October 12, 2016

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.

Participant
February 22, 2013

Adrian, I know it's been a while on this, but did you ever get it resolved.  If so, how?