soap - Magento - Resource not callable -


context

i tried, many times, create magento module providing set of custom methods.

i'm using magento 1.6.2 , followed many tutorials last try using this web utility - magento module creator.

in module configuration tried using: milyuncarros (as namespace) , mobile (as module). other stuff codepool , version left default values (local, 0.1.0).

in option "need add magento api" , added 1 method: salesearchcategories.

the site tells call soap methods like: yourmodulename_api.yourmethod (for case mobile_api.salesearchcategories or mobile_api.salesearchcategories - have issues both: "invalid api path" , "resource path not callable" respectively).

cache management disabled modules , ensured milyuncarros_mobile module enabled.

i explicitly enabled, after many tries, "rewriteengine on" in appache .htaccess @ magento root (i.e. sibling of /apps).

issue

when try call soap method created (with no parameters) soapfault "resource path not callable".

current state

generated file structure follows:

app/etc/modules/milyuncarros_mobile.xml (auto generated):

<?xml version="1.0"?> <config>   <modules>     <milyuncarros_mobile>       <active>true</active>       <codepool>local</codepool>                   <depends>         <mage_api />       </depends>       <version>0.1.0</version>     </milyuncarros_mobile>   </modules> </config> 

app/code/local/milyuncarros/mobile/model/api.php (autogenerated + edited):

<?php  class milyuncarros_mobile_model_api extends mage_api_model_resource_abstract {             public function salesearchcategories()     {         //everything generated following line         return array('active' => true);     } } 

app/code/local/milyuncarros/mobile/helper/data.php (autogenerated):

<?php  class milyuncarros_mobile_helper_data extends mage_core_helper_abstract { } 

app/code/local/milyuncarros/mobile/etc/api.xml (autogenerated):

<?xml version="1.0"?> <config>   <api>     <resources>       <mobile_api translate="title" module="mobile">         <title>myapi</title>         <acl>mobile/api</acl>         <model>mobile/api</model>         <methods>           <salesearchcategories translate="title" module="mobile">             <title>categories listed public sale searchable</title>             <acl>mobile/salesearchcategories</acl>           </salesearchcategories>         </methods>       </mobile_api>     </resources>     <acl>       <resources>         <mobile translate="title" module="mobile">           <title>mobile</title>           <sort_order>2000</sort_order>                               <salesearchcategories translate="title" module="mobile">             <title>categories listed public sale searchable</title>           </salesearchcategories>         </mobile>       </resources>     </acl>   </api> </config> 

(i tried mobile_api.salesearchcategories based on spec).

and -but not least important- module config file: app/code/local/milyuncarros/mobile/etc/config.xml (autogenerated):

<?xml version="1.0"?> <config>   <modules>     <milyuncarros_mobile>       <version>0.1.0</version>     </milyuncarros_mobile>   </modules>   <global>     <helpers>       <mobile>         <class>milyuncarros_mobile_helper</class>       </mobile>     </helpers>     <models>       <mobile>         <class>milyuncarros_mobile_model</class>         <resourcemodel>mobile_mysql4</resourcemodel>       </mobile>     </models>   </global> </config> 

question: when try call mobile_api.salesearchcategories error:

soapfault: resource path not callable.

what must stop getting error? documentation tells few nothing (or it's tricky searched in, , did not find it).

i solved it. module well-formatted (since used well-known generator that).

what did is:

  1. edit generated helper_data class extend mage_core_helper_data instead of _abstract.
  2. refresh cache (cache management) , refreshing compilation (tools > compilation).
  3. (i don't know if relevant) entered admin role soap , saved again role.

then worked: reach entry point using mobile_api.salesearchcategories.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -