OpenLEADR/openleadr-python

Question: using 2.0a XSD files instead of the supplied 2.0b schema

4dahalibut opened this issue · 1 comments

Hey Stan,
Would it be possible for you to support both 2.0a and 2.0b schema with openleadr? The client we're trying to integrate with is sending us requests on a 2.0a namespace such as the following

<?xml version="1.0" encoding="UTF-8"?>
<ns1:oadrRequestEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns1="http://openadr.org/oadr-2.0a/2012/07" xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
    <ns2:eiRequestEvent>
        <ns2:requestID>FCFB4D0617944DE3B8DACC477435D07D</ns2:requestID>
        <venID>XXX</venID>
    </ns2:eiRequestEvent>
</ns1:oadrRequestEvent>

And serving this request is resulting in the following error

XML schema validation of incoming message failed: Element '{http://openadr.org/oadr-2.0a/2012/07}oadrRequestEvent': No matching global declaration available for the validation root. (<string>, line 0).

At the moment that is not possible; OpenLEADR is 2.0b only. If you find a neat way to support both, I'd be open to any pull requests to get started.