0
我有一個WSDL這樣看,這是我無法改變:是否可以在這個wsdl中擴展這個complexType?
<?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>
,我想提出一個擴展複雜類型salesOrderEntity
,我看到一些WSDL(I got the reference from here),這是可能的。
現在我很困惑,如果它是可能的,如何延長這個特定的複雜類型
我的嘗試:
<complexType name="salesOrderCustomEntity">
<complexContent>
<extension base="salesOrderEntity">
<sequence>
<element name="some_field" type="xsd:string" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
和
<complexType name="salesOrderCustomEntity">
<complexContent>
<extension base="salesOrderEntity">
<all>
<element name="some_field" type="xsd:string" minOccurs="0"/>
</all>
</extension>
</complexContent>
</complexType>
但不管我得到「some_field」元素,但不會獲得complexType的所有元素。