2013-01-25 3 views
2

GWT 응용 프로그램에서 Google 서버에 연결하여 google 채팅을 내 Appllication에 통합하려고합니다. emite gwt 라이브러리를 사용해 보았지만 Google 서버에 연결하는 데 필요한 구성을 제대로 수행하지 못했습니다.GWT - GWT 응용 프로그램에서 talk.google.com에 연결

이 문제에 대한 도움을 주시면 매우 감사하겠습니다.

GWT 응용 프로그램에서 Emite를 사용하려고 할 때 다음 예외가 발생합니다. 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="[email protected]"> 
<meta name="emite.password" content="xxxxx"> 
<meta name="emite.chat" content="[email protected]"> 

에서 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> 

에서

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 

내가 무슨 말이냐?

감사합니다 몇 가지 검색 및 적성 검사 후

+0

'성공하지 못했습니다.'... 어떤 예외 ?? –

+0

다음 예외가 발생합니다. 00 : 01 : 07.158 2011 년 1 월 24 일 16:54:19 IST 2013 com.calclab.emite.core.client.bosh.XmppBoshConnection SEVERE : 연결 오류 # 1 : 잘못된 상태 : 302 remoteServer : talk.google .com remotePort : 5222 –

+0

다른 개발자가 도움을받을 수있는 출발점으로 코드 스 니펫과 오류 로그를 첨부하십시오. – SSR

답변

1

- 을 구글이 프록시 요청이 XMPP 서버를 구글하는 것이 자신의 보쉬 엔드 포인트가없는 것 같다. 그래서 ProxyServlet이 Google 서버에 연결하기 위해 작동하지 않습니다.

하지만 지금은 JabberHTTPBind을 사용하여 Google 서버에 연결할 수 있습니다. JabberHTTPBind 서블릿이 번들 된 emite-0.4.7-proxies.jar을 사용했습니다. 은 web.xml에, 이것은 나를 위해 일한 아래의 서블릿 매핑

<servlet> 
     <servlet-name>Jabber HTTP Binding Servlet</servlet-name> 
     <servlet-class>org.jabber.JabberHTTPBind.JHBServlet</servlet-class> 
    </servlet> 
    <servlet-mapping> 
     <servlet-name>Jabber HTTP Binding Servlet</servlet-name> 
     <url-pattern>/http-bind/*</url-pattern> 
    </servlet-mapping> 

을 추가했다. 이제 Emite를 사용하여 Google 서버에 연결할 수 있습니다.

관련 문제