On 6/15/10 11:01 AM, franck tankoua wrote:
Ok thanks.By the way I am seeing this in the web.xml of the server. {{{ <servlet-mapping> <servlet-name>restapiServlet</servlet-name> <url-pattern>/rest/*</url-pattern> <url-pattern>/gadgets/api/rest/*</url-pattern> <url-pattern>/social/rest/*</url-pattern> </servlet-mapping> }}} Normally this cannot work. At least on tomcat I had to change it to this so it work. {{{ <servlet-mapping> <servlet-name>restapiServlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>restapiServlet</servlet-name> <url-pattern>/gadgets/api/rest/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>restapiServlet</servlet-name> <url-pattern>/social/rest/*</url-pattern> </servlet-mapping> }}} Same thing for the servlet * "jsonRpcServlet"* and the filter* "authFilter"*
Actually, support for multiple url-pattern inside a single servlet- or filter-mapping was added in Servlet 2.5.
The following snippets are from web-app_2_5.xsd:
<xsd:complexType name="servlet-mappingType">
<xsd:sequence>
<xsd:element name="servlet-name"
type="javaee:servlet-nameType"/>
<xsd:element name="url-pattern"
type="javaee:url-patternType"
minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
[...]
<xsd:complexType name="filter-mappingType">
<xsd:sequence>
<xsd:element name="filter-name"
type="javaee:filter-nameType"/>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="url-pattern"
type="javaee:url-patternType"/>
<xsd:element name="servlet-name"
type="javaee:servlet-nameType"/>
</xsd:choice>
<xsd:element name="dispatcher"
type="javaee:dispatcherType"
minOccurs="0" maxOccurs="4"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
Jan
Thank you for your help On Tue, Jun 15, 2010 at 7:20 PM, Paul Lindner<[email protected]> wrote:social/rpc, gadgets/api/rpc and now /rpc should all map to the same handler now. On Tue, Jun 15, 2010 at 10:16 AM, franck tankoua<[email protected]> wrote:I am using java. I have tried what you have suggested ( http://localhost:8080/rpc?method=system.listMethods) but I have got a404error. looks like I need to change my web.xml. The /rpc is not defined but /social/rpc/* is. I will do a diff with the shindig-social to see what context have moved. Thank you. On Tue, Jun 15, 2010 at 7:09 PM, Paul Lindner<[email protected]> wrote:Java or PHP? Do you see the people.get method listed when you fetch http://localhost:8080/rpc?method=system.listMethods Here's what I'm seeing in a stock install:{"result":["samplecontainer.update","activities.supportedFields","activities.update","activities.delete","gadgets.metadata","activities.get","http.put","activitystreams.create","messages.modify","appdata.get","messages.get","system.listMethods","cache.invalidate","samplecontainer.get","people.supportedFields","http.head","http.delete","messages.create","people.get","activitystreams.get","activitystreams.update","messages.delete","appdata.update","http.post","activities.create","samplecontainer.create","http.get","appdata.delete","appdata.create","activitystreams.delete","activitystreams.supportedFields"]}On Tue, Jun 15, 2010 at 10:00 AM, franck tankoua<[email protected]> wrote:Hi, I am using thehttp://svn.apache.org/repos/asf/shindig/branches/2.0.xAnd the gadget which used to work does not work anymore because the osapi.people does not exist. Should we now register our ownpeople.getusing *osapi._registerMethod*? Before in version 1.6 It was working without problem. {{{ ... <Require feature="osapi" /> ..... function getAllFriends(){ var batch = osapi.newBatch(); batch.add('viewerFriends',osapi.people.getViewerFriends({fields:['userid'],sortBy:'name'},200)); batch.add('viewer', osapi.people.getViewer()); batch.execute(handleGetAllFriends); } ..... }}} Thanks -- Franck-- Franck
