I need to implement a SPML interface, which in the end is performing a SOAP request over HTTP(s). I have a wsdl for it which boils down to this:
<wsdl:types>
<schema targetNamespace="http://soapadapter.something" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="receiveRequest" type="xsd:anyType"/>
</schema>
</wsdl:types>
[...]
<wsdl:operation name="receiveRequest">
<wsdl:input message="impl:receiveRequestRequest" name="receiveRequestRequest"/>
</wsdl:operation>
As you can see, the only defined request element is of type "xsd:anyType". I have a separate xsd, not at all linked in the wsdl, which describes how the request should be formed.
I'd like to use zeep to implement a SOAP request for consuming the interface. How can I make zeep aware of that (local) xsd file?
I have found the zeep.xsd.schema.SchemaDocument
class, but no example of it being used anywhere.
Can someone give me a usage example of how to create a client that uses an wsdl and separate xsd file?
Yes, you can add additional schemas to your zeep client the following way: