Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4788

FIWARE.Question.Tech.Data.OrionContextBroker.AttributeReferenceForSubscription

    Details

      Description

      Created question in FIWARE Q/A platform on 11-12-2014 at 20:12
      Please, ANSWER this question AT http://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": [

      { "condValues": [ "PT10s" ], "type": "ONTIMEINTERVAL" }

      ],
      "entities": [

      { "id": "1.0", "type": "Capsule", "isPattern": "false" }

      ],
      "attributes": [
      "temperature"
      ]
      }

      Thanks in advance.

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-14 12:05|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-14 12:05|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-14 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-14 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-14 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-14 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-15 09:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-15 09:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: