Reputation: 39314
I do have an WDL looking like this, which I can not change:
<?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"
>
<import
namespace="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"
/>
<complexType name="salesOrderEntity">
<all>
<element
name="increment_id"
type="xsd:string"
minOccurs="0"
/>
<!-- lot more elements come here -->
</all>
</complexType>
</schema>
</types>
</definitions>
And I would like to make an extension to the complexType
salesOrderEntity
, I saw that was possible in some WSDL (I got the reference from here).
Now I'm confused if it is possible and how to extend this specific complexType
.
What I tried:
<complexType name="salesOrderCustomEntity">
<complexContent>
<extension base="salesOrderEntity">
<sequence>
<element name="some_field" type="xsd:string" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
and
<complexType name="salesOrderCustomEntity">
<complexContent>
<extension base="salesOrderEntity">
<all>
<element name="some_field" type="xsd:string" minOccurs="0"/>
</all>
</extension>
</complexContent>
</complexType>
But, for both, I do get the some_field
element but don't get all the elements of the salesOrderEntity
complexType
.
Upvotes: 0
Views: 1452
Reputation: 39314
Looks like I did found it. The declaration states :
xmlns:typens="urn:{{var wsdl.name}}"
So you have to extend the base complexType typens:salesOrderEntity
and not just salesOrderEntity
<complexType name="salesOrderCustomEntity">
<complexContent>
<extension base="typens:salesOrderEntity">
<all>
<element name="some_field" type="xsd:string" minOccurs="0"/>
</all>
</extension>
</complexContent>
</complexType>
Upvotes: 1