0

the last year, I created an example for CEP and it worked. My example was very simple; I put 2 params in input events in json format like (http://proton:8080/ProtonOnWebServer/rest/events):

{
    "Name":"InputEvent",
    "speed":"120",
    "limit":"100"
}

Now I'm trying to run this example and if I use the CEP (version 5.4.3) I've got an error when I try to send the input event, but if I use the old version (3.3.3) is ok. The error is:

SEVERE: Could not parse JSON NGSI event org.apache.wink.json4j.JSONException: The key [data] was not in the map, reason: The key [data] was not in the map

Could you suggest me how to write the REST payload in the input event?

Thank you and best regards,

Pasquale

pasquy73
  • 563
  • 3
  • 13
  • The problem seems to be in your json format: `The key [data] was not in the map`. Maybe this [link](http://stackoverflow.com/questions/33096357/cep-proton-the-key-was-not-in-the-map-reason-the-key-was-not-in-the-map) can help you (a similar problem). You can also improve your question editing it adding the exact post and get information (the requests you made). – Dalton Cézane Feb 01 '17 at 04:30

1 Answers1

0
  1. The support for simple JSON format was stopped when moving to v2 or Orion/CEP interface. Only the JSON NGSI contract is supported now, please reference the http://proactive-technology-online.readthedocs.io/en/latest/ProtonUserGuide_FI_WARE5_4_1/index.html#appendix "Appendix A: Integration with NGSI in the FIWARE project" chapter. It explains the contract between Context-Broker and CEP - the format of the event in the CEP application definition file, mandatory attributes, definition of relevant consumer for sending output events to Orion etc.
inna
  • 36
  • 1