Skip to main content
added 21 characters in body
Source Link
Tim Bezhashvyly
  • 11.6k
  • 6
  • 43
  • 73

You can have wsdl definitions in the local folder also. What you need to do is to create a custom module. In your custom module you can add the files api.xmlapi.xml, wsdl.xmlwsdl.xml and wsi.xmlwsi.xml inside the etcetc folder.

Your wsdl.xmlwsdl.xml file should be taken into consideration wenwhen building the actual wsdl. Magento merges all 'wsdl.xml'wsdl.xml files from all the modules that have one (same goes for api.xmlapi.xml and wsi.xmlwsi.xml). These files are merged, so you don't need the full xml file from Mage_CatalogMage_Catalog model. You can add only the pieces you need, just make sure you keep the same path.

Here is a simple example. In wsdl.xmlwsdl.xml from Mage_catalogMage_Catalog there is this piece of code:

<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>

And you want to add an other field to this type, all you have to do in your wsdl.xml file from your custom module is this:

    <definitions...>
        <types>
            <schema ...>
                <complexType name="catalogProductEntity">
                    <all>
                        <element name="custom_attribute" type="xsd:string"/>
                    </all>
                </complexType>
            </schema>
        </types>
    </definitions>

(add the attributes for the tags definitions and schema that I've replaced with '...').

You can have wsdl definitions in the local folder also. What you need to do is to create a custom module. In your custom module you can add the files api.xml, wsdl.xml and wsi.xml inside the etc folder.

Your wsdl.xml file should be taken into consideration wen building the actual wsdl. Magento merges all 'wsdl.xml' files from all the modules that have one (same goes for api.xml and wsi.xml). These files are merged, so you don't need the full xml file from Mage_Catalog model. You can add only the pieces you need, just make sure you keep the same path.

Here is a simple example. In wsdl.xml from Mage_catalog there is this piece of code

<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>

And you want to add an other field to this type, all you have to do in your wsdl.xml file from your custom module is this:

    <definitions...>
        <types>
            <schema ...>
                <complexType name="catalogProductEntity">
                    <all>
                        <element name="custom_attribute" type="xsd:string"/>
                    </all>
                </complexType>
            </schema>
        </types>
    </definitions>

(add the attributes for the tags definitions and schema that I've replaced with '...').

You can have wsdl definitions in the local folder also. What you need to do is to create a custom module. In your custom module you can add the files api.xml, wsdl.xml and wsi.xml inside the etc folder.

Your wsdl.xml file should be taken into consideration when building the actual wsdl. Magento merges all wsdl.xml files from all the modules that have one (same goes for api.xml and wsi.xml). These files are merged, so you don't need the full xml file from Mage_Catalog model. You can add only the pieces you need, just make sure you keep the same path.

Here is a simple example. In wsdl.xml from Mage_Catalog there is this piece of code:

<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>

And you want to add an other field to this type, all you have to do in your wsdl.xml file from your custom module is this:

    <definitions...>
        <types>
            <schema ...>
                <complexType name="catalogProductEntity">
                    <all>
                        <element name="custom_attribute" type="xsd:string"/>
                    </all>
                </complexType>
            </schema>
        </types>
    </definitions>

(add the attributes for the tags definitions and schema that I've replaced with '...').

Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

You can have wsdl definitions in the local folder also. What you need to do is to create a custom module. In your custom module you can add the files api.xml, wsdl.xml and wsi.xml inside the etc folder.

Your wsdl.xml file should be taken into consideration wen building the actual wsdl. Magento merges all 'wsdl.xml' files from all the modules that have one (same goes for api.xml and wsi.xml). These files are merged, so you don't need the full xml file from Mage_Catalog model. You can add only the pieces you need, just make sure you keep the same path.

Here is a simple example. In wsdl.xml from Mage_catalog there is this piece of code

<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>

And you want to add an other field to this type, all you have to do in your wsdl.xml file from your custom module is this:

    <definitions...>
        <types>
            <schema ...>
                <complexType name="catalogProductEntity">
                    <all>
                        <element name="custom_attribute" type="xsd:string"/>
                    </all>
                </complexType>
            </schema>
        </types>
    </definitions>

(add the attributes for the tags definitions and schema that I've replaced with '...').