cancel
Showing results for 
Search instead for 
Did you mean: 

Can't seem to extend the WSDL

Can't seem to extend the WSDL

Hi Guys.

Very new to Magento and having some issues extending it.

I need to add some attributes to the existing SOAP API.

I have the code working to add those attributes and if I add them to the WSDL and the WSI in the core it works fine, but whenever I remove them from the core and add files to the etc location in my local code dir it fails to work.

Specifically the API I am updating is salesOrderInfo.

I have created my override file inside /app/code/local/Mage/Sales/Model/Order/Api.php

I have put the following code in this location: /app/code/local/Mage/Sales/etc/wsdl.xml

<?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/" xmlns="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">
            <complexType name="salesOrderItemEntity">
                <all>
			<element name="pvx_line_price" type="xsd:string" minOccurs="0" />
                </all>
            </complexType>
        </schema>
    </types>
</definitions>

and the other one is here: /app/code/local/Mage/Sales/etc/wsi.xml

<?xml version="1.0" encoding="UTF-8"?>
<wsdl: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}}">
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
            <xsd:complexType name="salesOrderItemEntity">
                <xsd:sequence>
			<xsd:element name="pvx_line_price" type="xsd:string" minOccurs="0" />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
</wsdl:definitions>

 

I have tried so many times to work out what caches I might need to disable, rebuild etc but I've hit pretty much the end of my tether on this one. I've exhausted all the googling and tutorials I can find. I am basically following what I think should work.

 

Please bear in mind in your reply I am new to Magento so may not know how to do what you are describing. That said I am not new to PHP. It has to be said in all the years I have never found such a complex system to extend.

Thanks for any help