OpenLEADR/openleadr-python

Client: oadrCreatedReport has to respond with the requestID from the oadrRegisteredReport it's answering to

juantxorena opened this issue · 6 comments

Since oadrCreatedReport acts like an ACK for a oadrRegisteredReport, their reportIDs have to match. Conformance tests fail if otherwise

Is reportID even a part of oadrCreatedReport? From the schema it seems like it only contains the reportRequestId.

Could you explain what you think should be changed?

Is reportID even a part of oadrCreatedReport? From the schema it seems like it only contains the reportRequestId.

* [oadrCreatedReport schema](https://github.com/OpenLEADR/openleadr-python/blob/041f82dfcdf8e33d78940925d95aa1ad24c5e7e1/openleadr/schema/oadr_20b.xsd#L211-L228)

* [oadrPendingReport schema](https://github.com/OpenLEADR/openleadr-python/blob/041f82dfcdf8e33d78940925d95aa1ad24c5e7e1/openleadr/schema/oadr_20b.xsd#L595-L601)

Could you explain what you think should be changed?

Basically because the conformance tests fail if it's not like that

But what should be changed then? What does the OpenLEADR message look like, and what does it expect?

Sorry, I wasn't clear at all. I changed this code to the following:

        message = self._create_message(message_type,
                                       response={'response_code': 200,
                                                 'response_description': 'OK',
                                                 'request_id': response_payload['response']['request_id']},
                                       ven_id=self.ven_id,
                                       **message_payload)

and works.

The xml schema already has the info, but the requestID value wasn't being sent from here.

P.S., off-topic: as you can see, I'm working heavily with this library, we are developing an application with it, so expect lots of bug reports. I'm open to a more direct communication instead of using bug reports in github.

So this wasn't about reportID but about requestID? So the flow is:

VEN ----- [oadrRegisterReport(request_id=123, ...)] ---------- > VTN
VEN <---- [oadrRegisteredReport(response(request_id=123)] ------ VTN
VEN ----- [oadrCreatedReport(response(request_id=123)] --------> VTN

And the request ID of the original oadrRegisterReport is carried forward all the way through. I'll add the fix you suggested.

P.S., off-topic: as you can see, I'm working heavily with this library, we are developing an application with it, so expect lots of bug reports. I'm open to a more direct communication instead of using bug reports in github.

Please contact me at team@openleadr.org so we can talk. Thanks!