Write data

Writing data is accomplished with the write-data operation. Before writing data it is important to check the schematics for constraints. A numerical value may have a valid range and a string may have a maximum length.

Write data examples

Example request

<iq lang="en" to="testsource@xmpphost.clayster.com/sourcetest" 
  from="testcontrollerrandomwritertest@xmpphost.clayster.com/controllertest" 
  type="set" id="d6d9bf67-d341-43d0-b848-3f7977f79021">
  <write-data xmlns="urn:clayster:lwtsd">
    <accesstoken name="urn:clayster:cdo:sessionid">dummysession</accesstoken>
    <write resource="writables/item1" relativetimeout="10">3</write>
  </write-data>
</iq>

Example response

<iq xml:lang="en" 
  to="testcontrollerrandomwritertest@xmpphost.clayster.com/controllertest" 
  from="testsource@xmpphost.clayster.com/sourcetest" 
  type="result" 
  id="d6d9bf67-d341-43d0-b848-3f7977f79021"/>