1 issuing network synchronization commands – Echelon i.LON SmartServer 2.0 User Manual
Page 206

i.LON SmartServer 2.0 Programmer’s Reference
14-6
SmartServer and get its <UCPThandle> property. If you don’t specify the <UCPThandle> of the
current network, you will receive a response message with the following fault structure:
<fault>
<faultcode
faultType="_error">8</faultcode>
<faultstring xml:lang="en-US">It's not allowed to set more then one network.
</faultstring>
</fault>
Request (using the SmartServer Web service, select an existing LNS network database to which
the SmartServer will automatically be synchronized)
<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<Item
xsi:type="LON_Network_Cfg">
<UCPTname>MyNewNetwork_1</UCPTname>
<UCPThandle>873906929</UCPThandle>
<LnsDatabase>
<UCPTname>MyNewNetwork_1</UCPTname>
<UCPTservicePath>//WebService[UCPTindex=4]</UCPTservicePath>
</LnsDatabase>
<UCPTlnsSync
LonFormat="UCPTlnsSync">SYNC_LNS</UCPTlnsSync>
<UCPTmgmtMode
LonFormat="UCPTmgmtMode">LCA_ONNET</UCPTmgmtMode>
<UCPTlnsNetworkInterface>X.Default.SmartServer_RNI</UCPTlnsNetworkInterface>
</Item>
</iLonItem>
</Set>
Note: You need to specify the <UCPThandle> property with the handle of the current network on the
SmartServer or the response message will return an error.
Request (create a new network using the SmartServer Web service; use the same Set function to
create the LNS network database via the LNS Proxy Web service and automatically synchronize
the SmartServer to it)
<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item>
<UCPTname>MyNewNetwork_1</UCPTname>
<UCPThandle
xsi:type="number">873906929</UCPThandle>
<LnsDatabase>
<UCPTname>MyNewNetwork_1</UCPTname>
<UCPTservicePath
xsi:type="string">//WebService[UCPTindex=4]</UCPTservicePath>
</LnsDatabase>
<UCPTlnsSync xsi:type="string" LonFormat="UCPTlnsSync">SYNC_LNS</UCPTlnsSync>
<UCPTmgmtMode xsi:type="string" LonFormat="UCPTmgmtMode">LCA_ONNET</UCPTmgmtMode>
<UCPTlnsNetworkInterface>X.Default.SmartServer_RNI</UCPTlnsNetworkInterface>
</Item>
</iLonItem>
</Set>
Note: You need to specify the <UCPThandle> property with the handle of the current network on the
SmartServer or the response message will return an error.
Response
<SetResponse xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem >
<UCPTfaultCount>0</UCPTfaultCount>
<Item>
<UCPTname>MyNewNetwork_1</UCPTname>
</Item>
</iLonItem>
</SetResponse>
14.1.3.1 Issuing Network Synchronization Commands
You can use the InvokeCmd function to manually synchronize the objects in a L
ON
W
ORKS
network to
an LNS network database. If <UCPTlnsSync> is set to SYNC_NUL (LNS Manual; manual