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

FIWARE.Request.Tech.Apps.ApplicationMashup.HowToSubscribeToOrion

    Details

    • HD-Chapter:
      Apps
    • HD-Enabler:
      Wirecloud

      Description

      Buenos días,

      Estoy intentando generar una subscripcion desde un operator del wireCloud y
      necesitaría anadir una cabecera oauth en la request. esta parte no me esta
      funcionando muy bien y querría saber como debería hacerlo...

      Hasta ahora, el codigo para la subscripcipon es:

      var doInitialSubscription = function doInitialSubscription() {

      ngsi_server = MashupPlatform.prefs.get('ngsi_server');
      ngsi_proxy = MashupPlatform.prefs.get('ngsi_proxy');

      /*
      connection = new NGSI.Connection(ngsi_server,

      { ngsi_proxy_url: ngsi_proxy }

      );
      */

      connection = new NGSI.Connection(ngsi_server, {
      requestHeaders:

      {X-Auth-Token: 'Em_RZ3UvtN9EJedfQrJCX-sA60NSwr9mk6tNha5n3EsmZypfLQ'}

      });

      var entityIdList = [

      {type: 'pragmation', id: '.*', isPattern: true}

      ];
      var attributeList = ['aciertos'];
      var duration = 'P1M';
      var throttling = null;
      var notifyConditions = [

      { type: 'ONTIMEINTERVAL', condValues: ['PT10S'] }

      ];
      var options = {
      flat: true,
      onNotify: process_entities,
      onSuccess: function (data)

      { //ngsi_subscriptionId = data.subscriptionId; //ngsi_refresh_interval = setInterval(refreshNGSISubscription, 1000 * 60 * 60 * 2); // each 2 hours }

      };
      connection.createSubscription(entityIdList, attributeList,
      duration, throttling, notifyConditions, options);
      };

      Gracias de antemano por vuestra atención.

      Un saludo,
      Juan Carlos Hdez.

      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-lab-help

        Activity

        Hide
        aarranz Álvaro Arranz added a comment -

        Hola Juan Carlos,

        siento responder tan tarde, ¿sigues teniendo problemas al crear la subscripción? En tal caso, ¿te importaría crear esta pregunta en StackOverflow usando la etiqueta fiware-wirecloud?

        Un saludo.
        Álvaro

        Show
        aarranz Álvaro Arranz added a comment - Hola Juan Carlos, siento responder tan tarde, ¿sigues teniendo problemas al crear la subscripción? En tal caso, ¿te importaría crear esta pregunta en StackOverflow usando la etiqueta fiware-wirecloud? Un saludo. Álvaro
        Hide
        aarranz Álvaro Arranz added a comment -

        This question was resolved via skype as it was generated by a hack4good participant (Henar put him in contact with me via skype)

        Show
        aarranz Álvaro Arranz added a comment - This question was resolved via skype as it was generated by a hack4good participant (Henar put him in contact with me via skype)

          People

          • Assignee:
            aarranz Álvaro Arranz
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: