Skip to main content
July 18, 2009
Question

Consuming webservice is consuming my patience! [updated]

  • July 18, 2009
  • 1 reply
  • 3313 views

I'm totally cross posting this....  sorry to be rude, just not getting any action in the advanced forum.

Can anyone make this work?

I'm trying to connect to/consume a webservice from a Magento commerce store [written in php] but am having problems with coldfusion not being able to "find" the methods I need to invoke.

- I can create the object, log in, get a session but nothing [NOTHING!] else, none of the other methods are available - I just get a method not found error.

- the user "register" with key "register" has permission to use them and I can [have] prove that it works, I can for example call up  the store category tree VIAcatalogCategoryTree.

- the dump of the mage_obj shows all the methods available.

- The webservice is a Magento store [http://www.magentocommerce.com/]

- The API documentation is here http://www.magentocommerce.com/support/magento_core_api

- the webservice url is live, up and a test instance, so I am not afraid of it getting broken, please test to your heart's desire!

<cfscript>

mage_obj = CreateObject(webservice, http://mage.bigblock.ca/api/v2_soap?wsdl);
mage_session = mage_obj.login('register','register');

//retcat = mage_obj.catalogCategoryTree(mage_cats);

</cfscript>

<cfdump var="#mage_session#" />
<cfdump var="#mage_obj#" />
<!---cfdump var="#retcat#" /--->


If anyone can take a look, give this a try - give me any clues as to why I can't access the webservice VIA CFMX, I would REALLY-REALLY appreciate it.

I've been struggling with it for better than 2 days now. [more than 4 days now]

- thanks in advance

-sean

Message was edited by: sean69

This topic has been closed for replies.

1 reply

July 20, 2009

and bumped

Inspiring
July 20, 2009

Can you provide an example of a method you are trying to access but cannot?

I tried a few methods and both were found. Though catalogCategoryCurrentStore() returned "Requested store view not found" (obviously I did not know the valid storeView values ;-)

attrList = mage_obj.catalogCategoryAttributeList(mage_session);
store = mage_obj.catalogCategoryCurrentStore(mage_session, "test");

July 20, 2009

You got data back? hmmm.... for all three examples you cited.  - some of these return data even if they fail [!explain that one!] so is hard to troubleshoot...

this:

//retcat = mage_obj.catalogCategoryTree(mage_cats);

or the method

catalogCategoryTree() // it's args are optional, so that should do it!

should return the category tree on a cfdump - it should resemble the return data on this page http://mage.bigblock.ca/info.php

[also if you dump the mage_obj - you should get a full method listing - though it looks like that is exactly what you did. - or here http://mage.bigblock.ca/index.cfm]

thanks for looking in !

-sean