[Fiware-tech-help] Error in Orion CB <updateAction> DELETE

MIGUEL CARRILLO PACHECO miguel.carrillopacheco at telefonica.com
Wed Apr 29 09:48:02 CEST 2015


Hi Cristina,

Can you please ask this using Stackoverflow using the tag "fiware-orion"? It is the tool selected by the team of the Orion broker to provide support

http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker

Thanks

Miguel

El 28/04/2015 a las 11:21, Cristina Albaladejo Pérez escribió:
Hi.

I need to delete an attribute of a entity but I obtain error "No context element found".

Could you help me?

This is the attribute of entity:

    [root at host-192-168-192-78 conf]# (curl localhost:1026/NGSI10/queryContext -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format -) <<EOF
> <?xml version="1.0" encoding="UTF-8"?>
> <queryContextRequest>
>   <entityIdList>
>     <entityId type="Sensor" isPattern="false">
>       <id>1</id>
>     </entityId>
>   </entityIdList>
>   <attributeList>
>     <attribute>timestamp</attribute>
>   </attributeList>
> </queryContextRequest>
> EOF
<?xml version="1.0"?>
<queryContextResponse>
  <contextResponseList>
    <contextElementResponse>
      <contextElement>
        <entityId type="Sensor" isPattern="false">
          <id>1</id>
        </entityId>
        <contextAttributeList>
          <contextAttribute>
            <name>timestamp</name>
            <type>string</type>
            <contextValue>2015-04-15 11:10:00</contextValue>
          </contextAttribute>
        </contextAttributeList>
      </contextElement>
      <statusCode>
        <code>200</code>
        <reasonPhrase>OK</reasonPhrase>
      </statusCode>
    </contextElementResponse>
  </contextResponseList>
</queryContextResponse>
[root at host-192-168-192-78 conf]#


And here the xml code to delete it:

    [root at host-192-168-192-78 conf]# (curl localhost:1026/NGSI10/updateContext -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format - ) <<EOF
> <?xml version="1.0" encoding="UTF-8"?>
> <updateContextRequest>
>   <contextElementList>
>     <contextElement>
>       <entityId type="Sensor" isPattern="false">
>         <id>1</id>
>       </entityId>
>       <contextAttributeList>
>         <contextAttribute>
>           <name>timestamp</name>
>           <type>string</type>
>           <contextValue/>
>         </contextAttribute>
>       </contextAttributeList>
>     </contextElement>
>   </contextElementList>
>   <updateAction>DELETE</updateAction>
> </updateContextRequest>
> EOF
<?xml version="1.0"?>
<updateContextResponse>
  <contextResponseList>
    <contextElementResponse>
      <contextElement>
        <entityId type="Sensor" isPattern="false">
          <id>1</id>
        </entityId>
      </contextElement>
      <statusCode>
        <code>404</code>
        <reasonPhrase>No context element found</reasonPhrase>
        <details>1</details>
      </statusCode>
    </contextElementResponse>
  </contextResponseList>
</updateContextResponse>
[root at host-192-168-192-78 conf]#


Regards.

Cristina



_______________________________________________
Fiware-tech-help mailing list
Fiware-tech-help at lists.fi-ware.org<mailto:Fiware-tech-help at lists.fi-ware.org>
https://lists.fi-ware.org/listinfo/fiware-tech-help



--

Please update your address book with my new e-mail address: miguel.carrillopacheco at telefonica.com<mailto:miguel.carrillopacheco at telefonica.com>

----------------------------------------------------------------------
     _/          _/_/                     Miguel Carrillo Pacheco
    _/   _/     _/  _/   Telefónica       Distrito Telefónica
   _/ _/_/_/   _/   _/   Investigación y  Edifico Oeste 1, Planta 6
  _/   _/     _/  _/     Desarrollo       Ronda de la Comunicación S/N
 _/          _/_/                         28050 Madrid (Spain)
                                          Tel:  (+34) 91 483 26 77

                         e-mail: miguel.carrillopacheco at telefonica.com<mailto:miguel.carrillopacheco at telefonica.com>

Follow FIWARE on the net

        Website:  http://www.fiware.org
        Facebook: https://www.facebook.com/eu.fiware
        Twitter:  http://twitter.com/Fiware
        LinkedIn: https://www.linkedin.com/groups/FIWARE-4239932
----------------------------------------------------------------------

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150429/e6e7c314/attachment.html>


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