Thanks for your reply. Actually I tested with a test code too. As I said when 
it comes in the Get method incorrectly I printed the method name from request 
too. It was post. So method was post but It went into the Get method because I 
called Get method of that resource first. I know it is strange but It happened. 
As I told, I tested it with code and client. FYI, I'm using spring as the main 
container and Spring create resources for me. I guess resources were working 
properly before integrating with spring. the part of context xml related to 
restlet framework is:

<bean id="LogsServerResource" 
class="com.company.alran.services.resources.LogsServerResource">
                <property name="logAgentService" ref="logAgentServiceTarget" />
        </bean>
        <bean id="ListsServerResource" 
class="com.company.alran.services.resources.ListsServerResource">
                <property name="ListService" ref="ListServiceTarget" />
                <property name="communicationService" 
ref="communicationServiceTarget" />
        </bean>
        <bean id="ListServerResource" 
class="com.company.alran.services.resources.ListServerResource">
                <property name="communicationService" 
ref="communicationServiceTarget" />
        </bean>
        <bean id="StatusServerResource" 
class="com.company.alran.services.resources.StatusServerResource">
                <property name="communicationService" 
ref="communicationServiceTarget" />
        </bean>
        <bean id="ConfigServerResource" 
class="com.company.alran.services.resources.ConfigServerResource">
        </bean>
        <bean id="router" class="org.restlet.ext.spring.SpringRouter">
                <property name="attachments">
                        <map>
                                <entry key="/offices/{officeId}/logs">
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method name="create"
                                                        
bean="LogsServerResource" />
                                        </bean>
                                </entry>
                                <entry key="/offices/{officeId}/lists"> 
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method name="create"
                                                        
bean="ListsServerResource" />
                                        </bean>
                                </entry>
                                <entry 
key="/offices/{officeId}/lists/{ListId}/status"> 
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method name="create"
                                                        
bean="StatusServerResource" />
                                        </bean>
                                </entry>
                                <entry 
key="/offices/{officeId}/lists/{ListId}"> 
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method name="create"
                                                        
bean="ListServerResource" />
                                        </bean>
                                </entry>
                                <entry key="/offices/{officeId}/configuration"> 
                                        <bean 
class="org.restlet.ext.spring.SpringFinder">
                                                <lookup-method name="create"
                                                        
bean="ConfigServerResource" />
                                        </bean>
                                </entry>
                        </map>
                </property>
        </bean>
        <bean id="application" 
class="com.company.alran.services.PortalRestletApplication" scope="prototype">
                <property name="root" ref="router"/>
        </bean> 



and the part in web.xml is: 

        <servlet>
                <servlet-name>restlet</servlet-name>
                <servlet-class>
                        org.restlet.ext.spring.SpringServerServlet
                </servlet-class>
                <init-param>
                        <param-name>org.restlet.application</param-name>
                        <param-value>application</param-value>
                </init-param>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>restlet</servlet-name>
                <url-pattern>/restlet/*</url-pattern>
        </servlet-mapping>

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

Reply via email to