First of all, never interfere with the default elements of any Magento API V2 WSDL configuration file. This is a basic rule.
Please keep in mind to write these following elements at the beginning of each user-defined WSDL file or make sure that these following elements are present at the beginning of the WSDL file of your target existing module: -
- "
definition " ( <definitions> - start tag) - "
types " ( <types> - start tag) - "
schema " ( <schema> - start tag) - "
import " ( <import /> - singleton tag without end tag)
You can then continue to define complex Magento API V2 data types for this custom module.
You can very well understand all these concepts by looking at some of the existing Magento API V2 WSDL files.
Now back to your questions ...
1. Any method for solving it? As I said before, save the above element definitions at the top of your WSDL file.
The import statement should have been: -
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
without end tag. Also, the attribute name is " schemaLocation ", not " schemaLocation ". Follow the Camel case.
2. Can I make this xmlsoap.org xml file on localhost or on my own server so that my script does not depend on a file on my server?
Yes, you can, but you need to know and support two important points: -
- Both the "
namespace " and " schemaLocation " schemaLocation must have a type URI, in accordance with the W3C specifications. Therefore, your local files for both of these attributes must also be accessible in your local browser using the HTTP protocol. - If you support it on your local hard drive, you forget about one golden update rule for the SOAP / 1.1 encoding file scheme. This is because if (only if) the W3C updates this file in the same URI, then your Magento will be able to accept it automatically if a common URI is provided; otherwise, you will need to upload this updated file to your server again.
Beyond these two highlights, everything is fine and you are good to go.
However, I hope that I answered all your inquiries. Hope this helps.
source share