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.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.