[xsd-users] Limiting the "depth" of serialized objects

Falendysz, Gene Gene.Falendysz at itron.com
Mon Oct 11 12:48:32 EDT 2010


I have an object that has as an element a list. Currently when I serialize this object it serializes each of the elements in the list with all of their sub-elements. What I require is that only the href of the list elements gets included in the serialization of the main object. Following is an excerpt from the specification I am trying to implement.

GET /goose/{#}/egg returns an EXI list (described by the schema) of individual eggs that belong to this goose, each with their own URI that is subordinate to this URI.

The client would send:

GET /Goose/1/Egg HTTP/1.1

Host: {IPv6 Address}



The server would respond:

HTTP/1.1 200 OK

Content-Type: application/exi



<?xml version='1.0' encoding='UTF-8'?>

<EggList xmlns='http{s}://www.zigbee.org/doc/se-2-0-0'>

  <Goose href="http{s}://{IPv6 Address/Goose/1" name="1" />

  <Egg href="http{s}://{IPv6 Address}/Goose/1/Egg/0" name="0" />

  <Egg href="http{s}://{IPv6 Address}/Goose/1/Egg/1" name="1" />

</EggList>


GET /goose/{#}/egg/{#} returns an EXI representation (described by the schema) of the egg addressed by this URI.

The client would send:

GET /Goose/1/Egg/1 HTTP/1.1

Host: {IPv6 Address}



The server would respond:

HTTP/1.1 200 OK

Content-Type: application/exi



<?xml version='1.0' encoding='UTF-8'?>

<Egg xmlns='http{s}://www.zigbee.org/doc/se-2-0-0'>

  <Name>1</Name>

  <href>http{s}://{IPv6 Address}/Goose/1/Egg/1</href>

  <EggList href="http{s}://{IPv6 Address}/Goose/1/Egg" name="Egg" />

  <Color>White</Color>

  <Broken>No</Broken>

  <Gender>Male</Gender>

</Egg>


Gene Falendysz
Principal Engineer
Phone: (864) 718.6676
Fax: (864) 718.6871
www.itron.com<http://www.itron.com/>
[cid:image001.gif at 01CB6941.3E0B9BD0]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4783 bytes
Desc: image001.gif
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20101011/56fd9aaf/image001.gif


More information about the xsd-users mailing list