Hi there

Firstly I love restlet and much thanks to the people who work on it and i have 
been able to get up to speed really quickly.

I have two questions. One is where to find a complete example of the 
spring-restlet integration. I tried the cvs repo on the wiki and for some 
reason could never get there?!?

The next and more important REST and url extension and return format? I am in 
the quandry of deciding to do my rest API via extension or an 'optional' 
argument. I have included a snippit of my spring config below...

i.e.

1) myapi/v1/company/1.xml (or rss, json) bla bla bla

2) a) myapi/v1/company/1 -> default xml
     b) myapi/v1/company/1&format=xml
     c) myapi/v1/company/1/&format=xml
     
2a and 2c works right out of the box so to speak. However 1 and 2b break since 
they pass in 1.xml and 1&format=xml in the company {id} param. I would like to 
make my urls at least work for 2b or possibly 1 as well. I was not sure if I 
had to define some special regex in my routes for each pattern or if there was 
a global way to do cush filtering/url munging with restlet. Or if I had to roll 
my own. My end goal is to switch the accepted varient type based on either uri 
extension or optional format=XXX but get some strange behaviour in the routing 
itself.

My same was pulled from the spring sample and works wonderully minus this 
extension parsing issue.

<entry key="/company/{id}">
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method 
name="createResource" bean="companyResource" />
                                        </bean>
                                </entry>

// this would work for xml but I do not want to do this for // every extension
<entry key="/company/{id}.xml">

Thanks in advance..

matt

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=990197

Reply via email to