[Fiware-lab-help] Problem with connection using NGSI API

Giuseppe Cossu giuseppe.cossu at create-net.org
Fri Nov 20 17:16:06 CET 2015


Hi,
are you using some GE or fireware-lab component? If yes, my suggestion is
to look at the changelogs of the new versions.

Of course I can't check your code.

Regards,
Giuseppe

On Fri, Nov 20, 2015 at 4:25 PM, Artur Löwen <aloewen at gridhound.de> wrote:

> Hi,
>
> I haven't used my mashup application in the last few weeks, but now my
> NGSI query operator stopped working. After some digging and debugging, it
> seems like the NGSI connection is passing the url of my context broker
> through this url "https://mashup.lab.fiware.org/proxy/<cb_url>" and here
> seems to be the problem. The context broker itself is working fine when
> used from other applications.
>
> The same problem seems to occur, when using the NGSI browser widget from
> the marketplace.
>
> What do I have to do to fix this?
>
> My source looks like this:
>
>         this.ngsi_server = MashupPlatform.prefs.get('ngsi_server');
>         this.ngsi_proxy = MashupPlatform.prefs.get('ngsi_proxy');
>
>         var request_headers = {};
>
>         if (MashupPlatform.prefs.get('use_owner_credentials')) {
>             request_headers['X-FI-WARE-OAuth-Token'] = 'true';
>             request_headers['X-FI-WARE-OAuth-Header-Name'] =
> 'X-Auth-Token';
>             request_headers['x-FI-WARE-OAuth-Source'] = 'workspaceowner';
>         }
>
>         this.connection = new NGSI.Connection(this.ngsi_server, {
>             use_user_fiware_token:
> MashupPlatform.prefs.get('use_user_fiware_token'),
>             request_headers: request_headers,
>             ngsi_proxy_url: this.ngsi_proxy
>         });
>
>         var types = MashupPlatform.prefs.get('ngsi_entities').split(new
> RegExp(',\\s*'));
>
>         var entityIdList = [];
>         var attributeList = [];
>         var entityId;
>         for (var i = 0; i < types.length; i++) {
>             entityId = {
>                 id: '.*',
>                 type: types[i],
>                 isPattern: true
>             };
>             entityIdList.push(entityId);
>         }
>
>         var options = {
>             flat: true,
>             limit: 1000,
>             offset: 0,
>             details: true,
>             onSuccess: function (data, details) {
>
>                 for (var entityId in data) {
>                     MashupPlatform.wiring.pushEvent("entityOutput",
> JSON.stringify(data[entityId]));
>                 }
>                 if (details.count > options.offset + options.limit)
>                 {
>                         options.offset += options.limit;
>                         this.connection.query(entityIdList, attributeList,
> options);
>                 }
>             }.bind(this),
>             onFailure: function (e) {
>                 MashupPlatform.operator.log("Error querying entities from
> context broker server: " + e.message);
>             }
>         };
>         this.connection.query(entityIdList, attributeList, options);
>
> --
> Artur Löwen
> CEO
> Gridhound UG (haftungsbeschränkt)
> +49 179 1449189
> aloewen at gridhound.de
> www.gridhound.de
> Since January 1st, old domains won't be supported and messages sent to any
> domain different to @lists.fiware.org will be lost.
> Please, send your messages using the new domain (
> Fiware-lab-help at lists.fiware.org) instead of the old one.
> _______________________________________________
> Fiware-lab-help mailing list
> Fiware-lab-help at lists.fiware.org
> https://lists.fiware.org/listinfo/fiware-lab-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-lab-help/attachments/20151120/a8e89f22/attachment.html>


More information about the Fiware-lab-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy