After some searches and tryouts - It seems that Google does not have their own bosh endpoint which would proxy request to google xmpp server. So, somehow ProxyServlet isn't working for me to connect to google server.
But now I am able to connect to google server using JabberHTTPBind
.
I used the emite-0.4.7-proxies.jar
, which has JabberHTTPBind
servlet bundled.
In web.xml, added the below servlet mapping
<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>
This worked for me. And now I am able to connect to google server using Emite.