Echelon i.LON SmartServer Technical Information Page 25

  • Download
  • Add to my manuals
  • Print
  • Page
    / 443
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 24
i.LON SmartServer 2.0 Programmer’s Reference
2-11
You can cast an item to a more specialized type using meta data (the xsi:type attribute) that is passed
along with the application data. The xsi:type attribute describes the actual type of an item and is
passed as an attribute of the <Item> element. If the sent type is the expected base type (Item, Item_Cfg
or, Item_Data), no xsi:type attribute is sent. For more information on xsi types, go to
www.w3.org/TR/xmlschema-1/#Instance_Document_Construction.
2.5.7
SOAP Message Attributes
Version 4.0 SOAP request messages support some attributes, and the response messages from the
SmartServer always contain all attributes. If the data type of an item is not the declared as a base type
in the SOAP request (Item, Item_Cfg, or Item_Data), the xsi:type attribute will be added to the item
instance. Note that you do not have to set the xsi:type attribute in a SOAP request if you are using a
SOAP framework like .NET or one of Java’s SOAP frameworks. This is because the xsi:type attribute
is part of the XML Schema specification, and it will be added automatically.
For more information on the xsi:type attribute, see the Version 4.0 XML schema type (iLON100.xsd),
which is installed in the L
ONWORKS\iLon100\images\iLon100 4.0x\web\WSDL\v4.0 folder on your
computer when you install the SmartServer software.
2.5.8
Using xSelect Statements in SOAP Message Requests
You can use xSelect statements in List, Get, Read, and Delete messages to filter the items returned by
the function. The xSelect statement queries the item instances in a given data set and returns those
items meeting the specified criteria. The xSelect statement provides some of the functionality of the
xPath language defined by the W3C, except that you can compare strings to dates using compare
operators “<”, “>”, and “=”.
Each xSelect statement should specify an xsi (item) type. An xSelect statement may reference an item
identifier <UCPTname> and contain some predicates [predicate1] [ predicate2]. In any xSelect
statement, the predicates may include a <UCPTlastUpdate> expression and a position () expression.
Common predicates used include contains and starts-with.
The predicates are processed as a cascade of queries. For example, you could first use a
<UCPTlastUpdate> query to get the items that were updated during a specific time period and then
query items 10 to 20 returned by the first result using a position() expression.
Collection type Item type of
Page view 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 442 443

Comments to this Manuals

No comments