This is an extremely simple Droplet with source, a config file, and a sample JSP. All the droplet does it transform a passed-in RepositoryItem into XML and dump it out. It would be handy for vending data to client-side logic in JavaScript or Flash, when you don’t want to write-up a full WebService.

You can download it all here.

The example JSP takes in a query parameter userId and generates the XML for the user profile with that id. For instance, if you call:

http://alita.local:8840/test/test.jsp?userId=930003

you get this……

<user:user id="user930003" repositoryid="_003930003" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:user="http://www.atg.com/ns/UserProfiles/user" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.atg.com/ns/UserProfiles/user UserProfiles+user.xsd ">
<user:user.securitystatus xsi:type="integer">0</user:user.securitystatus>
<user:user.scenarioinstances xsi:nil="true"></user:user.scenarioinstances>
<user:user.votecount xsi:nil="true"></user:user.votecount>
<user:user.firstname xsi:type="string"></user:user.firstname>
<user:user.gender xsi:type="string"></user:user.gender>
<user:user.emailstatus xsi:type="string"></user:user.emailstatus>
<user:user.dateofbirth xsi:type="date">1980-02-11</user:user.dateofbirth>
<user:user.markers xsi:nil="true"></user:user.markers>
<user:user.locale xsi:nil="true"></user:user.locale>
<user:user.lastactivity xsi:nil="true"></user:user.lastactivity>
<user:user.slotinstances xsi:nil="true"></user:user.slotinstances>
<user:user.lastname xsi:type="string"></user:user.lastname>
<user:user.description xsi:nil="true"></user:user.description>
<user:user.email xsi:nil="true"></user:user.email>
<user:user.autologin xsi:type="boolean">false</user:user.autologin>
<user:user.businessprocessmarkers xsi:nil="true"></user:user.businessprocessmarkers>
<user:user.middlename xsi:type="string"></user:user.middlename>
<user:user.password xsi:type="string"></user:user.password>
<user:user.receiveaffemail xsi:nil="true"></user:user.receiveaffemail>
<user:user.lastpasswordupdate xsi:type="timestamp">2007-08-06T20:13:46.0</user:user.lastpasswordupdate>
<user:user.generatedpassword xsi:type="boolean">false</user:user.generatedpassword>
<user:user.receivepcaemail xsi:nil="true"></user:user.receivepcaemail>
<user:user.receiveemail xsi:type="string"></user:user.receiveemail>
<user:user.registrationdate xsi:nil="true"></user:user.registrationdate>
<user:user.usertype xsi:nil="true"></user:user.usertype>
<user:user.previouspasswords xsi:nil="true"></user:user.previouspasswords>
<user:user.member xsi:type="boolean">false</user:user.member>
<user:user.login xsi:type="string"></user:user.login>
<user:user.mailings xsi:nil="true"></user:user.mailings>
<user:user.scenariovalues xsi:nil="true"></user:user.scenariovalues>
<user:user.nickname xsi:nil="true"></user:user.nickname>
<user:user.lastemailed xsi:nil="true"></user:user.lastemailed>
</user:user>

I may extend it to serve out collections of items (currently if you nest it in an RQLForEach or similar, you get the <?xml line once per item. It’s not much, but hey, this is my first ATG post:)

Devon