Published on WSO2 Oxygen Tank (http://wso2.org)

Does the Session Host Object support looping?

By prasadgc
Created 2008-02-10 20:06

Hi,

I'm trying to extend the REST sample to provide a "list" capability by creating a new function listWeather() whose httpMethod is "GET" and whose httpLocation is "weather", not "weather/{city}".

Within the function body, I need to loop through all objects held in the session object, but it appears from the API for the session host object that only put() and get() methods are supported. It would be good to have size() and getKeys() methods as well.

Any suggestions for a workaround?

Regards,

Ganesh Prasad


Source URL:
http://wso2.org/forum/thread/3205