【发布时间】:2013-01-25 06:24:24
【问题描述】:
我想从我的 GWT 应用程序连接到谷歌服务器,以将谷歌聊天集成到我的应用程序中。 我曾尝试使用 emite gwt 库,但没有成功配置连接到 google 服务器所需的配置。
对此的任何帮助都非常感谢。
尝试在 GWT 应用程序中使用 Emite 时出现以下异常。
00:01:07.158 [INFO] Thu Jan 24 16:54:19 IST 2013 com.calclab.emite.core.client.bosh.XmppBoshConnection SEVERE: Connection error #1: Bad status: 302
在 web.xml 中
<servlet>
<servlet-name>Proxy</servlet-name>
<servlet-class>de.spieleck.servlets.ProxyServlet</servlet-class>
<init-param>
<param-name>remotePath</param-name>
<param-value>/http-bind/</param-value>
</init-param>
<init-param>
<param-name>remoteServer</param-name>
<param-value>talk.google.com</param-value>
</init-param>
<init-param>
<param-name>remotePort</param-name>
<param-value>5222</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Proxy</servlet-name>
<url-pattern>/http-bind</url-pattern>
</servlet-mapping>
在 GWTModule.html 中
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="emite.httpBase" content="/http-bind">
<meta name="emite.host" content="talk.google.com">
<meta name="emite.session" content="login">
<meta name="emite.onBeforeUnload" content="logout">
<meta name="emite.user" content="abc@gmail.com">
<meta name="emite.password" content="xxxxx">
<meta name="emite.chat" content="xxxx@gmail.com">
我在这里错过了什么?
问候
【问题讨论】:
-
'没有成功'...有什么例外吗??
-
我收到以下异常。 00:01:07.158 [INFO] Thu Jan 24 16:54:19 IST 2013 com.calclab.emite.core.client.bosh.XmppBoshConnection 严重:连接错误 #1:错误状态:302 remoteServer:talk.google.com remotePort : 5222
-
请附上代码sn-p和错误日志作为其他开发者帮助你的起点。
-
请求的类型是什么???
-
@SSR 请在上面找到sn-p。我需要知道,如何使用 Emite 库连接到 talk.google.com。
标签: java gwt xmpp google-talk