आप स्थानीय फ़ोल्डर में भी wsdl परिभाषाएँ रख सकते हैं। कस्टम मॉड्यूल बनाने के लिए आपको क्या करने की आवश्यकता है। अपने कस्टम मॉड्यूल में आप फ़ाइलों को api.xml, wsdl.xmlऔर फ़ोल्डर के wsi.xmlअंदर जोड़ सकते हैं etc।
wsdl.xmlवास्तविक wsdl का निर्माण करते समय आपकी फ़ाइल को ध्यान में रखा जाना चाहिए। Magento के सभी wsdl.xmlफ़ाइलों को उन सभी मॉड्यूल से मिलाता है जिनमें एक (एक ही होता है api.xmlऔर wsi.xml) होता है। इन फ़ाइलों को मर्ज किया गया है, इसलिए आपको Mage_Catalogमॉडल से पूर्ण xml फ़ाइल की आवश्यकता नहीं है । आप केवल अपनी जरूरत के टुकड़े जोड़ सकते हैं, बस यह सुनिश्चित करें कि आप एक ही रास्ता रखते हैं।
ये रहा एक सरल उदाहरण। में wsdl.xmlसे Mage_Catalogवहाँ कोड के इस टुकड़े है:
<definitions...>
<types>
<schema ...>
<complexType name="catalogProductEntity">
<all>
<element name="product_id" type="xsd:string"/>
<element name="sku" type="xsd:string"/>
<element name="name" type="xsd:string"/>
<element name="set" type="xsd:string"/>
<element name="type" type="xsd:string"/>
<element name="category_ids" type="typens:ArrayOfString"/>
<element name="website_ids" type="typens:ArrayOfString"/>
</all>
</complexType>
</schema>
</types>
</definitions>
और आप इस प्रकार से एक अन्य फ़ील्ड जोड़ना चाहते हैं, आपको केवल अपने कस्टम मॉड्यूल से अपनी wsdl.xml फ़ाइल में यह करना है:
<definitions...>
<types>
<schema ...>
<complexType name="catalogProductEntity">
<all>
<element name="custom_attribute" type="xsd:string"/>
</all>
</complexType>
</schema>
</types>
</definitions>
(टैग परिभाषा और स्कीमा के लिए विशेषताएँ जोड़ें जिन्हें मैंने '...' के साथ बदल दिया है)।