php - SoapFault - Function ("function_name") is not a valid method for this service - Magento 1.9
one text
i'm working on magento 1.9 and i have tried to create a custom soap api.
I followed the steps on this tutorial (and other ones) but i didn't manage to successfully call the functions, it always return => Function ("function_name") is not a valid method for this service.
Ps : when i retrieve the soap function i have never found the ones i created.
I tried to empty the cache, on php.ini i set
"soap.wsdl_cache_enabled = 0",
When i instanciate SoapClient i do as followed =>
$client = new SoapClient('http://URL/index.php/api/v2_soap?wsdl=1',
array('cache_wsdl' => WSDL_CACHE_NONE ));
So i assume it's not a cache issue
To call the function i use
$products = $client->vendorProductList($session);
And Here is my wsdl file
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}"
targetNamespace="urn:{{var wsdl.name}}">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="fieldInfo">
<sequence>
<element name="entity_id" type="xsd:string"/>
<element name="name" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="fieldInfoArray">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:fieldInfo[]" />
</restriction>
</complexContent>
</complexType>
</schema>
</types>
<message name="vendorProductListRequest">
<part name="sessionId" type="xsd:string" />
</message>
<message name="vendorProductListResponse">
<part name="products" type="typens:fieldInfoArray" />
</message>
<portType name="{{var wsdl.handler}}PortType">
<operation name="vendorProductList">
<documentation>List of products</documentation>
<input message="typens:vendorProductListRequest" />
<output message="typens:vendorProductListResponse" />
</operation>
</portType>
<binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="vendorProductList">
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
<input>
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="{{var wsdl.name}}Service">
<port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
<soap:address location="{{var wsdl.url}}" />
</port>
</service>
</definitions>
PSS : I'm using php 5.6
CAN SOMEONE PLEASE HELP ME???
GREATLY APPRECIATE ANY HELP.
Source