[Fiware-tech-help] Fetch Data From Orion Context Broker

Álvaro Arranz aarranz at ficodes.com
Wed May 16 11:40:36 CEST 2018


Hi again,

Regarding this:

I’ve used the same settings for the URL of ngsi-source operator but getting
> the below error in the logs.
>                 Error creating subscription in the context broker server:
> The server returned an invalid json structure.



This probably has something to do with some problematic characters inside
data values. Are you using new line characteres (e.g. «\n») inside data
values?, In that case, you should escape them, because the orion context
broker has a bug and does not encode them correctly, returning an invalid
JSON response. See this ticket
<https://github.com/telefonicaid/fiware-orion/issues/2938> for more details.

Best regards,
Álvaro
[image: FICODES]FUTURE INTERNET CONSULTING & DEVELOPMENT SOLUTIONS S.L
<http://www.ficodes.com/>
*Álvaro Arranz García*

Chief Executive Officer <http://ficodes.com/>

aarranz at ficodes.com

+34 669 079 467

www.ficodes.com


El mar., 15 de may. de 2018 a la(s) 13:57, Prashant Chauhan1 (
PC00474884 at techmahindra.com) escribió:

> Hi Miguel,
>
>
>
> Thanks for your support.
>
>
>
> I’ve used the same settings for the URL of ngsi-source operator but
> getting the below error in the logs.
>
>                 Error creating subscription in the context broker server:
> The server returned an invalid json structure.
>
> Also I have used this configuration before, but could not receive any
> result.
>
> Please help me resolve this over WebEX call, it will just take 15 minutes
> of your time.
>
> Also, PFA the ngsi-settings.PNG file for your reference.
>
>
>
>
>
> <http://www.techmahindra.com/>
>
>
>
> *Prashant Chauhan*
>
>
>
> Software Engineer
>
>
>
> CIESIOT
>
> Noida-NSEZ
>
>
>
> Mobile : +919582019151
>
>
>
> PC00474884 at techmahindra.com
>
>
>
>
>
> We believe
>
>
>
>
>
>
>
> <http://online.wsj.com/ad/inthefuture/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *From:* mjimenez at conwet.com <mjimenez at conwet.com> *On Behalf Of *Miguel
> Jimenez
> *Sent:* Tuesday, May 15, 2018 3:34 PM
> *To:* Prashant Chauhan1 <PC00474884 at TechMahindra.com>
> *Cc:* fiware-tech-help at lists.fiware.org; Krishan Babbar
> <KB00449283 at TechMahindra.com>; Álvaro Arranz <aarranz at ficodes.com>; Yugal
> Kishor Mullick <YM00106030 at TechMahindra.com>; Francisco de la Vega <
> fdelavega at ficodes.com>
> *Subject:* Re: [Fiware-tech-help] Fetch Data From Orion Context Broker
>
>
>
> Hi Prashant,
>
>
>
> That operator does require 2 general configs regarding URLs of the CB:
>
>    - URL of the Context Broker, that would be the one you indicate
>    http://130.206.117.237:1026
>    - URL of a proxy (so as to receive asynchronous notifications for
>    subscriptions), that you can leave by default on a global instance running
>    at https://ngsiproxy.lab.fiware.org or deploying your own one.
>
> Besides this information, some other configs are required to address
> specific information. You can indicate an ID pattern or a query, or you can
> simply indicate the type of the desired entities, plus the FIWARE service
> (tenant) required for accessing them, and the FIWARE service path where
> that entities have been uploaded inside the CB. In case you want
> subscriptions (through the proxy), and not only an initial query, you have
> to indicate, coma sepparated, the list of attributes whose change would
> fire a new asinchronous notifications (a new entity with that attributes
> does also fires this).
>
>
>
> And appart from that, you would want to consume the information. Operators
> Entity 2 PoI (generic, does require a setting to indicate the attribute to
> search for location information and an icon) or FIWARE data model 2 PoI
> (based on FIWARE data models, fully automatic handling dozens of different
> icons) does generate points of interest so as to easily be imported in a
> map (Open Layers map is simpler since it does not require google api kkey).
> You can download and analyze their code, in case you want to learn how to
> handle notification events, but they are simply json objects with the data
> (full query or individual objects).
>
>
>
> Let me get more detailed information on the Table Viewer widget, since
> I've not used it for long. I'll will come with further details.
>
>
>
> Best regards,
>
>
> ───────────────────────────
> Miguel Jiménez Gañán, PhD.
>   Dpto. Lenguajes y Sistemas Informáticos e Ingeniería de Software
>   Escuela Técnica Superior de Ingenieros Informáticos
>   Universidad Politécnica de Madrid (UPM)
> ───────────────────────────
>
>
>
> On Mon, May 14, 2018 at 12:18 PM, Prashant Chauhan1 <
> PC00474884 at techmahindra.com> wrote:
>
> Hi,
>
>
>
> I’m trying to use the ‘*ngsi-source-operator*’ to fetch data from ‘*Orion
> context broker*’ and trying to populate that data on the Map Widget.
>
> My Orion instance is running @ http://130.206.117.237:1026 and I’m using
> the global instance of wirecloud.
>
> Please suggest me, what setting should I use for NGSI-source-operator in
> order to fetch data.
>
> Also while creating subscriptions, which URL should I use to send the
> notifications.
>
>
>
> Another query is regarding Table Viewer widget, as it requires input
> points as ‘Data and Structures’, is there any available operator to fetch
> or create a dataset for this table viewer widget.
>
>
>
>
>
> <http://www.techmahindra.com/>
>
>
>
> *Prashant Chauhan*
>
>
>
> Software Engineer
>
>
>
> CIESIOT
>
> Noida-NSEZ
>
>
>
> Mobile : +919582019151
>
>
>
> PC00474884 at techmahindra.com
>
>
>
>
>
> We believe
>
>
>
>
>
>
>
> <http://online.wsj.com/ad/inthefuture/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ============================================================================================================================
>
> Disclaimer:  This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html externally
> http://tim.techmahindra.com/tim/disclaimer.html internally within
> TechMahindra.
>
>
> ============================================================================================================================
>
>
>
> __________________________________________________________________________________________
>
> You can get more information about our cookies and privacy policies on the
> following links:
> -
> http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE_Privacy_Policy
> -
> http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Cookies_Policy_FIWARE
>
> Fiware-tech-help mailing list
> Fiware-tech-help at lists.fiware.org
> https://lists.fiware.org/listinfo/fiware-tech-help
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180516/3c1ae0dc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4760 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180516/3c1ae0dc/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1929 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180516/3c1ae0dc/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1929 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180516/3c1ae0dc/attachment-0005.png>


More information about the Fiware-tech-help mailing list

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