xml-responses.js 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. const responseMinXml = `<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/emix/2011/06/siscale" xmlns:ns4="http://www.w3.org/2005/Atom" xmlns:ns5="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns6="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns7="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns8="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" 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:oadrResponse ns7:schemaVersion="2.0b">
  5. <ns7:eiResponse>
  6. <ns7:responseCode>200</ns7:responseCode>
  7. <ns11:requestID>9383fc5946cb0e14ef5a</ns11:requestID>
  8. </ns7:eiResponse>
  9. </ns2:oadrResponse>
  10. </ns2:oadrSignedObject>
  11. </ns2:oadrPayload>`;
  12. const responseMaxXml = `<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/emix/2011/06/siscale" xmlns:ns4="http://www.w3.org/2005/Atom" xmlns:ns5="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns6="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns7="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns8="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" 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">
  13. <ns2:oadrSignedObject>
  14. <ns2:oadrResponse ns7:schemaVersion="2.0b">
  15. <ns7:eiResponse>
  16. <ns7:responseCode>200</ns7:responseCode>
  17. <ns7:responseDescription>OK</ns7:responseDescription>
  18. <ns11:requestID>9383fc5946cb0e14ef5a</ns11:requestID>
  19. </ns7:eiResponse>
  20. <ns7:venID>D8:1D:4B:20:5A:65:4C:50:32:FA</ns7:venID>
  21. </ns2:oadrResponse>
  22. </ns2:oadrSignedObject>
  23. </ns2:oadrPayload>`;
  24. const responseMissingRequiredXml = `<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/emix/2011/06/siscale" xmlns:ns4="http://www.w3.org/2005/Atom" xmlns:ns5="http://docs.oasis-open.org/ns/emix/2011/06/power" xmlns:ns6="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:ns7="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:ns8="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:ns10="http://www.opengis.net/gml/3.2" xmlns:ns11="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" 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">
  25. <ns2:oadrSignedObject>
  26. <ns2:oadrResponse ns7:schemaVersion="2.0b">
  27. <ns7:eiResponse>
  28. <ns7:responseDescription>OK</ns7:responseDescription>
  29. <ns11:requestID>9383fc5946cb0e14ef5a</ns11:requestID>
  30. </ns7:eiResponse>
  31. <ns7:venID>D8:1D:4B:20:5A:65:4C:50:32:FA</ns7:venID>
  32. </ns2:oadrResponse>
  33. </ns2:oadrSignedObject>
  34. </ns2:oadrPayload>`;
  35. module.exports = {
  36. responseMinXml,
  37. responseMaxXml,
  38. responseMissingRequiredXml,
  39. };