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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150428/7a4d8932/attachment.html>
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy