Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 11-12-2014 at 20:12
Please, ANSWER this question AT https://stackoverflow.com/questions/27430623/attribute-reference-for-subscription-in-orion-context-broker-fiware
Question:
Attribute Reference for subscription in Orion Context Broker Fiware
Description:
What do I need to put in the reference attribute?
I'm using two forms, and the two are bad for Orion Context Broker:
URL url = new URL("http://130.206.127.23:1026/ngsi10/notifyContext");
//String url = "http://localhost:1028/accumulate";
cabecera.put("reference", ""+url);
With this code, I'm generating the next JSON String for the reference attribute
...."reference":"http:\/\/130.206.127.23:1026\/ngsi10\/notifyContext",...
And this is the response of OCB
<subscribeContextResponse>
<subscribeError>
<errorCode>
<code>400</code>
<reasonPhrase>Bad Request</reasonPhrase>
<details>JSON Parse Error: <unspecified file>(1): invalid escape sequence</details>
</errorCode>
</subscribeError>
</subscribeContextResponse>
Also related to this parameter,do I need a program in execution in a server to receive the information about my subscription?
Can I get a program from Orion Context Broker resources to do this task?
The following is my JSON to call the service, but I'm not sure about the reference attribute. I want to send a subscription to my Orion Context Broker instance. I'm sending this JSON:
{
"duration": "P1M",
"reference": "http://130.206.127.23:1026/ngsi10/notifyContext",
"notifyConditions": [
],
"entities": [
],
"attributes": [
"temperature"
]
}
Thanks in advance.
2017-05-30 12:05|CREATED monitor | # answers= 1, accepted answer= True