http://track.sipfoundry.org/browse/XX-7014
This turned out to be mostly a mechanical exercise. I re-mapped indexed collection so that Hibernate takes care of updating list index (previously sipXconfig had to set 'position' field manually). Details described here: http://tinyurl.com/ycy7gdq Such change means however, that collection elements do not have easy access to their position in the collection. Turns out there are very few places where it was used: mostly when producing XML for SOAP and REST. It's not impossible to add explicit position element when producing such XML. But from all I am reading on this subject it should be not necessary. This is for example what Michael Key (of XSLT fame) has to say on the subject: http://www.stylusstudio.com/xmldev/200411/post00300.html "There is a widely held consensus in XML that element order is significant but attribute order is not.[...] Remember that XML was originally designed for documents. The assumption that the order of paragraphs in a text is significant is so deeply ingrained that no-one thought it needed saying." I do not want to change existing SOAP API: so I added the code that would add "position" element where it was before. But for a sole REST API that is using this at the moment I am considering just dropping 'position'. That would mean that forwarding service would now produce and consume something that looks like this: <call-sequence> <rings> <ring> <expiration>25</expiration> <type>If no response</type> <enabled>true</enabled> <number>200</number> </ring> <ring> <expiration>26</expiration> <type>At the same time</type> <enabled>true</enabled> <number>201</number> </ring> .... instead of: <call-sequence> <rings> <ring> <expiration>25</expiration> <type>If no response</type> <enabled>true</enabled> <number>200</number> <position>0</position> </ring> <ring> <expiration>26</expiration> <type>At the same time</type> <enabled>true</enabled> <number>201</number> <position>1</position> </ring> .... Opinions? D. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
