xml-responses.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. 'use strict';
  2. const createReportMaxXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  3. <ns2:oadrSignedObject>
  4. <ns2:oadrCreateReport ns3:schemaVersion="2.0b">
  5. <ns4:requestID>31c5ce71a68a73ece370</ns4:requestID>
  6. <ns2:oadrReportRequest>
  7. <ns3:reportRequestID>87bbc1d44d903f317758</ns3:reportRequestID>
  8. <ns3:reportSpecifier>
  9. <ns3:reportSpecifierID>TELEMETRY_USAGE</ns3:reportSpecifierID>
  10. <ns5:granularity>
  11. <ns5:duration>PT30S</ns5:duration>
  12. </ns5:granularity>
  13. <ns3:reportBackDuration>
  14. <ns5:duration>PT1M</ns5:duration>
  15. </ns3:reportBackDuration>
  16. <ns3:reportInterval>
  17. <ns5:properties>
  18. <ns5:dtstart>
  19. <ns5:date-time>2020-05-09T03:24:48.000Z</ns5:date-time>
  20. </ns5:dtstart>
  21. <ns5:duration>
  22. <ns5:duration>PT24H</ns5:duration>
  23. </ns5:duration>
  24. </ns5:properties>
  25. </ns3:reportInterval>
  26. <ns3:specifierPayload>
  27. <ns3:rID>rep1</ns3:rID>
  28. <ns3:readingType>x-notApplicable</ns3:readingType>
  29. </ns3:specifierPayload>
  30. <ns3:specifierPayload>
  31. <ns3:rID>rep2</ns3:rID>
  32. <ns3:readingType>x-notApplicable</ns3:readingType>
  33. </ns3:specifierPayload>
  34. </ns3:reportSpecifier>
  35. </ns2:oadrReportRequest>
  36. <ns2:oadrReportRequest>
  37. <ns3:reportRequestID>3d92d98e0b65d94e60a7</ns3:reportRequestID>
  38. <ns3:reportSpecifier>
  39. <ns3:reportSpecifierID>TELEMETRY_STATUS</ns3:reportSpecifierID>
  40. <ns5:granularity>
  41. <ns5:duration>PT30S</ns5:duration>
  42. </ns5:granularity>
  43. <ns3:reportBackDuration>
  44. <ns5:duration>PT2M</ns5:duration>
  45. </ns3:reportBackDuration>
  46. <ns3:reportInterval>
  47. <ns5:properties>
  48. <ns5:dtstart>
  49. <ns5:date-time>2020-05-09T03:25:44.000Z</ns5:date-time>
  50. </ns5:dtstart>
  51. <ns5:duration>
  52. <ns5:duration>PT24H</ns5:duration>
  53. </ns5:duration>
  54. </ns5:properties>
  55. </ns3:reportInterval>
  56. <ns3:specifierPayload>
  57. <ns3:rID>ts1</ns3:rID>
  58. <ns3:readingType>x-notApplicable</ns3:readingType>
  59. </ns3:specifierPayload>
  60. </ns3:reportSpecifier>
  61. </ns2:oadrReportRequest>
  62. </ns2:oadrCreateReport>
  63. </ns2:oadrSignedObject>
  64. </ns2:oadrPayload>`;
  65. const createReportMinXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  66. <ns2:oadrSignedObject>
  67. <ns2:oadrCreateReport ns3:schemaVersion="2.0b">
  68. <ns4:requestID>4323</ns4:requestID>
  69. </ns2:oadrCreateReport>
  70. </ns2:oadrSignedObject>
  71. </ns2:oadrPayload>`;
  72. const createReportMissingRequiredXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  73. <ns2:oadrSignedObject>
  74. <ns2:oadrCreateReport ns3:schemaVersion="2.0b">
  75. <ns4:requestID>4323</ns4:requestID>
  76. <ns2:oadrReportRequest>
  77. <ns3:reportSpecifier>
  78. <ns3:reportSpecifierID>TELEMETRY_STATUS</ns3:reportSpecifierID>
  79. <ns5:granularity>
  80. <ns5:duration>PT1M</ns5:duration>
  81. </ns5:granularity>
  82. <ns3:reportBackDuration>
  83. <ns5:duration>PT1M</ns5:duration>
  84. </ns3:reportBackDuration>
  85. <ns3:reportInterval>
  86. <ns5:properties>
  87. <ns5:dtstart>
  88. <ns5:date-time>2020-05-07T17:48:15.000Z</ns5:date-time>
  89. </ns5:dtstart>
  90. <ns5:duration>
  91. <ns5:duration>PT24H</ns5:duration>
  92. </ns5:duration>
  93. </ns5:properties>
  94. </ns3:reportInterval>
  95. <ns3:specifierPayload>
  96. <ns3:rID>ts1</ns3:rID>
  97. <ns3:readingType>x-notApplicable</ns3:readingType>
  98. </ns3:specifierPayload>
  99. </ns3:reportSpecifier>
  100. </ns2:oadrReportRequest>
  101. </ns2:oadrCreateReport>
  102. </ns2:oadrSignedObject>
  103. </ns2:oadrPayload>`;
  104. const registeredReportMaxXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  105. <ns2:oadrSignedObject>
  106. <ns2:oadrRegisteredReport ns3:schemaVersion="2.0b">
  107. <ns3:eiResponse>
  108. <ns3:responseCode>200</ns3:responseCode>
  109. <ns3:responseDescription>OK</ns3:responseDescription>
  110. <ns4:requestID>31c5ce71a68a73ece370</ns4:requestID>
  111. </ns3:eiResponse>
  112. <ns2:oadrReportRequest>
  113. <ns3:reportRequestID>87bbc1d44d903f317758</ns3:reportRequestID>
  114. <ns3:reportSpecifier>
  115. <ns3:reportSpecifierID>TELEMETRY_USAGE</ns3:reportSpecifierID>
  116. <ns5:granularity>
  117. <ns5:duration>PT30S</ns5:duration>
  118. </ns5:granularity>
  119. <ns3:reportBackDuration>
  120. <ns5:duration>PT1M</ns5:duration>
  121. </ns3:reportBackDuration>
  122. <ns3:reportInterval>
  123. <ns5:properties>
  124. <ns5:dtstart>
  125. <ns5:date-time>2020-05-09T03:24:48.000Z</ns5:date-time>
  126. </ns5:dtstart>
  127. <ns5:duration>
  128. <ns5:duration>PT24H</ns5:duration>
  129. </ns5:duration>
  130. </ns5:properties>
  131. </ns3:reportInterval>
  132. <ns3:specifierPayload>
  133. <ns3:rID>rep1</ns3:rID>
  134. <ns3:readingType>x-notApplicable</ns3:readingType>
  135. </ns3:specifierPayload>
  136. <ns3:specifierPayload>
  137. <ns3:rID>rep2</ns3:rID>
  138. <ns3:readingType>x-notApplicable</ns3:readingType>
  139. </ns3:specifierPayload>
  140. </ns3:reportSpecifier>
  141. </ns2:oadrReportRequest>
  142. <ns2:oadrReportRequest>
  143. <ns3:reportRequestID>3d92d98e0b65d94e60a7</ns3:reportRequestID>
  144. <ns3:reportSpecifier>
  145. <ns3:reportSpecifierID>TELEMETRY_STATUS</ns3:reportSpecifierID>
  146. <ns5:granularity>
  147. <ns5:duration>PT30S</ns5:duration>
  148. </ns5:granularity>
  149. <ns3:reportBackDuration>
  150. <ns5:duration>PT2M</ns5:duration>
  151. </ns3:reportBackDuration>
  152. <ns3:reportInterval>
  153. <ns5:properties>
  154. <ns5:dtstart>
  155. <ns5:date-time>2020-05-09T03:25:44.000Z</ns5:date-time>
  156. </ns5:dtstart>
  157. <ns5:duration>
  158. <ns5:duration>PT24H</ns5:duration>
  159. </ns5:duration>
  160. </ns5:properties>
  161. </ns3:reportInterval>
  162. <ns3:specifierPayload>
  163. <ns3:rID>ts1</ns3:rID>
  164. <ns3:readingType>x-notApplicable</ns3:readingType>
  165. </ns3:specifierPayload>
  166. </ns3:reportSpecifier>
  167. </ns2:oadrReportRequest>
  168. </ns2:oadrRegisteredReport>
  169. </ns2:oadrSignedObject>
  170. </ns2:oadrPayload>`;
  171. const registeredReportMinXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  172. <ns2:oadrSignedObject>
  173. <ns2:oadrRegisteredReport ns3:schemaVersion="2.0b">
  174. <ns3:eiResponse>
  175. <ns3:responseCode>200</ns3:responseCode>
  176. <ns4:requestID>31c5ce71a68a73ece370</ns4:requestID>
  177. </ns3:eiResponse>
  178. </ns2:oadrRegisteredReport>
  179. </ns2:oadrSignedObject>
  180. </ns2:oadrPayload>`;
  181. const registeredReportMissingRequiredXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  182. <ns2:oadrSignedObject>
  183. <ns2:oadrRegisteredReport ns3:schemaVersion="2.0b">
  184. <ns3:eiResponse>
  185. <ns3:responseCode>200</ns3:responseCode>
  186. <ns3:responseDescription>OK</ns3:responseDescription>
  187. </ns3:eiResponse>
  188. </ns2:oadrRegisteredReport>
  189. </ns2:oadrSignedObject>
  190. </ns2:oadrPayload>`;
  191. const updatedReportMaxXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  192. <ns2:oadrSignedObject>
  193. <ns2:oadrUpdatedReport ns3:schemaVersion="2.0b">
  194. <ns3:eiResponse>
  195. <ns3:responseCode>200</ns3:responseCode>
  196. <ns3:responseDescription>OK</ns3:responseDescription>
  197. <ns4:requestID>4323</ns4:requestID>
  198. </ns3:eiResponse>
  199. <ns3:venID>D8:1D:4B:20:5A:65:4C:50:32:FA</ns3:venID>
  200. </ns2:oadrUpdatedReport>
  201. </ns2:oadrSignedObject>
  202. </ns2:oadrPayload>`;
  203. const updatedReportMinXml = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  204. <ns2:oadrSignedObject>
  205. <ns2:oadrUpdatedReport ns3:schemaVersion="2.0b">
  206. <ns3:eiResponse>
  207. <ns3:responseCode>200</ns3:responseCode>
  208. <ns4:requestID>4323</ns4:requestID>
  209. </ns3:eiResponse>
  210. </ns2:oadrUpdatedReport>
  211. </ns2:oadrSignedObject>
  212. </ns2:oadrPayload>`;
  213. const updatedReportMissingRequired = `<ns2:oadrPayload xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07" xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns8="http://www.w3.org/2005/Atom" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:ns12="http://www.w3.org/2009/xmldsig11#" xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties" xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
  214. <ns2:oadrSignedObject>
  215. <ns2:oadrUpdatedReport ns3:schemaVersion="2.0b">
  216. <ns3:eiResponse>
  217. <ns4:requestID>4323</ns4:requestID>
  218. </ns3:eiResponse>
  219. </ns2:oadrUpdatedReport>
  220. </ns2:oadrSignedObject>
  221. </ns2:oadrPayload>`;
  222. module.exports = {
  223. createReportMaxXml,
  224. createReportMinXml,
  225. createReportMissingRequiredXml,
  226. registeredReportMaxXml,
  227. registeredReportMinXml,
  228. registeredReportMissingRequiredXml,
  229. updatedReportMaxXml,
  230. updatedReportMinXml,
  231. updatedReportMissingRequired,
  232. };