Echelon i.LON 100 e2 Internet Server User Manual
Page 218
![background image](/manuals/735745/218/background.png)
i.
LON 100 Internet Server Programmer’s Reference
14-11
rapping Elements
.UCPTstartIndex = 5001
.UCPTcount = 3
End
With
'Add the updated row to the Table
myDataTable_Data.AddiLONDataServerRow(myDataRow_Data)
'Now the root element must be removed since the SOAP message
'provides the element as the root element. This is
'described in more detail in W
on page 14-8.
Dim
myXML
As
New
Xml.XmlDocument()
myXML.LoadXml(myDataSet_Data.GetXml())
Dim
myElement
As
Xml.XmlElement
myElement = myXML.FirstChild
'The XML string is now ready to be passed to the function.
Dim
myXMLString
As
String
myXMLString = myElement.InnerXml
'Specify IP location of the
i.
LON 100 by replacing the default
' “localhost” with the IP address used by the
i.
LON 100.
Dim
myURL
As
String
myURL = myWebReference.Url()
myWebReference.Url = myURL.Replace_
("localhost", "192.168.1.253")
'Call DataServerList and send the SOAP message.
myXMLString = myWebReference.DataServerList(myXMLString)
'To drop the returned XML string into a DataSet, you must first
'pass it to a reader. The reader will provide the base
'functionality required to read the data in the result DataSet
'to the project.
Dim
myReader
As
System.IO.StringReader
myReader =
New
System.IO.StringReader(myXMLString)
'Pass the reader to a DataSet type defined by the result
'DataSet created for the project. In this case, this DataSet is
'called DataServerList_Result.xsd.
Dim
myDataSet_Result
As
New
DataServerList_Result_Element()
myDataSet_Result.ReadXml(myReader, XmlReadMode.InferSchema)
'The DpNVLDataTable that stores the retrieved data is a table
'defined in the DataServerList_Result_Element schema added to
'the project.
Dim
myDataTable_DpNVL
As _
DataServerList_Result_Element.DpNVLDataTable
myDataTable_DpNVL = myDataSet_Result.DpNVL
Dim
myDataTable_NVL
As _
DataServerList_Result_Element.NVLDataTable
myDataTable_NVL = myDataSet_Result.NVL