python-zeep
python-zeep copied to clipboard
Wrongs Namespace
Hi All.
I have some problems on loading a WSDL.
WSDL reference two schema:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dummy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" name="IWsAPIAccount" targetNamespace="http://dummy"> <types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://dummy"> <xs:include schemaLocation="/xsd/Schema1.xsd"/> <xs:include schemaLocation="/xsd/Schema2.xsd"/> </xs:schema> </types>
Schema1.xsd include another XSD:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="../xsd/APICommon.xsd"/>
I have two kind of problem:
1 - Before I create the client with Client(wsdl=mywsdl), I need to change the WSDL adding a . before /xsd:
<xs:include schemaLocation="./xsd/Account.xsd"/>
2 - Client(wsdl=mywsdl) fails:
Unable to resolve type {http://schemas.xmlsoap.org/wsdl/}AVAILABILITY. No schema available for the namespace 'http://schemas.xmlsoap.org/wsdl/'.
AVAILABILITY is defined in APICommon.xsd that is include in Schema1.xsd; APICommon1.xsd has xmlns:xs="http://www.w3.org/2001/XMLSchema" as namespace.
What's wrong?