读书人

Shindig学习【未完成此贴临时停止】

发布时间: 2012-10-19 16:53:37 作者: rapoo

Shindig学习【未完成此贴,暂时停止】

Apache Shindig homepage

http://shindig.apache.org

?

实验0:Shindig初体验

部署应用:

1:下载最新的war包

http://shindig.apache.org/download/index.html

(目前版本http://repo2.maven.org/maven2/org/apache/shindig/shindig-server/1.1-BETA5-incubating/shindig-server-1.1-BETA5-incubating.war)

?

2:将war包copy到 $TOMCAT_HOME/webapps下

?

3:修改$TOMCAT_HOME/conf下的server.xml文件

?

?

4:启动tomcat后,打开浏览器测试一下:http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml

效果如下:


Shindig学习【未完成此贴,临时停止】

?

5:有了gadget容器,我们可以尝试着render各种gadget

下面的网址是个gadget的目录,view details后copy gadget的xml源代码附加到http://localhost:8080/gadgets/ifr?url=后面。

http://directory.opensocial.org/gadgets/directory?synd=cad

?

这里贴几个我试验过的gadget:

http://www.labpixies.com/campaigns/sudoku/sudoku.xml&source=lpep??

http://graargh.returnstrue.com/lane/opensocial/v09/mashup/gifts.xml

http://hosting.gmodules.com/ig/gadgets/file/100080069921643878012/myspace.xml?

http://warmbrain.com/gadgets/flickr.xml

?

?

实验1:下载最新的Build包进行编译运行调试

参照官网build新包和设置了Eclipse编译环境

http://shindig.apache.org/developers/java/build.html

?

?

?

??? 编译源代码:mvn

"shindig" : {
"consumer_key" : "http://localhost:8080/samplecontainer/examples/shindigoauth.xml",
"consumer_secret" : "secret",
"key_type" : "HMAC_SYMMETRIC"
}
}

?

同时,我们还需要生成server端自己的key:

Step1:到链接处下载Openssl,http://www.slproweb.com/products/Win32OpenSSL.html

?

Step2:用下面两个命令可以生成key

openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem? -out testkey.pem -subj '/CN=mytestkey'

openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM

?


?

?


X-shindig-dos: on
Host: localhost:8080
Connection: Keep-Alive
User-Agent: Apache Shindig

??

??

返回的响应HTTP/1.1 200 OK
Content-Type: text/plain
Expires: Tue, 27 Apr 2010 11:16:39 GMT
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 134
Server: Jetty(6.1.22)

oauth_token=b57e1ba2-9eb7-49aa-8a44-89ccf4d6cace&oauth_token_secret=f615ed6a-2fc3-45d9-92bf-9b57a7f1f935&oauth_callback_confirmed=true

?

Gadget

http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadgets-API-Specification.html#gadgets.io.AuthorizationType

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

读书人网 >互联网

热点推荐