在本地搭建UCHome+OSYOP的环境(测试OpenSocial应用)
http://sites.google.com/a/osyop.com/osyop/uchome_osyop_local
会继续发布更多的资料,
希望能使更多的开发者受益。
James
On 2月21日, 下午4时49分, James Zhang <jmszh...@gmail.com> wrote:
> 演示站点www.osyop.com
请教一个在OSYOP上运行"JAVA版好友买卖"时一个有关URL编码的问题:
在第一次运行执行InitPlayerCommand时,
OpenSocial JS API获得的
photoUrl为:
"http://localhost/ucenter/avatar.php?uid=1&size=small&type=virtual"
经过requests.js下面方法的转化
var postdata = gadgets.io.encodeValues(this.httpParameters);
原有的photoUrl被转换为:
http%3A%2F%2Flocalhost%2Fucenter%2Favatar.php%3Fuid%3D1%26size%3Dsmall
%26type%3Dvirtual
最后在Java服务端用下面方法接收的photourl为空!?
String photourl = request.getParameter("photoUrl");
代码下面判断photourl为空,则返回错误。
这导致整个应用无法正常运行。
-------------------
另外我尝试了一下,在Firefox地址栏里输入
http://localhost:8080/ff/req?ctn=DEFAULT&vid=1&oid=1&cmd=init&name=admin&photoUrl=http%3A%2F%2Flocalhost%2Fucenter%
2Favatar.php%3Fuid%3D1%26size%3Dsmall%26type%3Dvirtual
服务器端是可以接收到photoUrl的。
有无建议?
-James
On 2月23日, 下午11时14分, James Zhang <jmszh...@gmail.com> wrote:
> Sirius,hi:
>
> 请教一个在OSYOP上运行"JAVA版好友买卖"时一个有关URL编码的问题:
>
> 在第一次运行执行InitPlayerCommand时,
>
> OpenSocial JS API获得的
> photoUrl为:
> "http://localhost/ucenter/avatar.php?uid=1&size=small&type=virtual"
>
> 经过requests.js下面方法的转化
> var postdata = gadgets.io.encodeValues(this.httpParameters);
>
> 原有的photoUrl被转换为:
> http%3A%2F%2Flocalhost%2Fucenter%2Favatar.php%3Fuid%3D1%26size%3Dsmall
> %26type%3Dvirtual
>
> 最后在Java服务端用下面方法接收的photourl为空!?
> String photourl = request.getParameter("photoUrl");
>
> 代码下面判断photourl为空,则返回错误。
> 这导致整个应用无法正常运行。
>
> -------------------
> 另外我尝试了一下,在Firefox地址栏里输入http://localhost:8080/ff/req?ctn=DEFAULT&vid=1&oid=1&cmd=init&name=ad...
On 2月21日, 下午4时49分, James Zhang <jmszh...@gmail.com> wrote:
> 演示站点www.osyop.com
>
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“OpenSocial 中文讨论组”论坛。
要在此论坛发帖,请发电子邮件到 opensoci...@googlegroups.com
要退订此论坛,请发邮件至 opensocial-chi...@googlegroups.com
更多选项,请通过 http://groups.google.com/group/opensocial-china?hl=zh-CN 访问该论
坛
-~----------~----~----~----~------~----~------~--~---