Build web im Based on openfire + WeChat chat

Source: Internet
Author: User

Paste to: http://www.javaeye.com/topic/154697

 

Study now. Go home and study it.

 

**************************************** *************************************

Jabber is a well-known Instant Messaging Service server. It is a free and open-source software that allows users to build their own instant messaging servers and apply them on the Internet or LAN.

XMPP (Scalable Message Processing site protocol) is based on the Extensible Markup Language (XML) protocol for instant messaging IM) and online on-site detection. It facilitates quasi-real-time operations between servers.
This protocol may eventually allow Internet users to send instant messages to anyone else on the Internet, even if the operating system is different from the browser. XMPP technology comes from jabber. In fact, it is
Because of the Core Protocol of Jabber, XMPP is sometimes referred to as the jabber protocol. Jabber is an im Application Based on XMPP protocol. In addition to jabber, XMPP also supports
Supports many applications.

**************************************** **************************************** *

1. the commonly used Jabber server software is openfire. Openfire is an instant communication service based on XMPP protocol.

 

As with the Open Source spirit, XMPP is also a type of software that can accommodate various protocols.

 

Communication Protocol. In short, XMPP protocol is an "open protocol" that allows clients to use various communications

 

The Protocol is connected to openfire (server side). Therefore, openfire Based on XMPP protocol is used to allow customers

 

Use clients based on various protocols for communication.

 

 

2. WeChat chat is a powerful web-based Jabber Client. Developed using Ajax technology,

 

This client only uses JavaScript and HTML. It provides basic Jabber instant messaging functions, user management,

 

Group chat Based on muc Protocol

 

 
The following describes how to build a system. Most of the information on the Internet shows incomplete descriptions of the software versions used by myself. I used tomcat to check the service unavaliable error (depressing) for a few days ), after my tests, such a combination can be:

 

Software Version
Openfire 3.4.3
WeChat chat 1.0beta3
Tomcat 6.0
JDK 1.6

 

 

 

 

Later, according to tests by netizens, tomcat5.5 is also acceptable, and I initially used tomcat5.0. Therefore, it is preliminarily estimated that the tomcat version is later than 5.5.

 

Why JDK 1.6? That's because a plug-in named jabberhttpbind in WeChat chat is compiled in the jdk1.6 environment.

 

If other JDK versions are used, the system will prompt that the class version is incorrect. Of course, you can re-compile these classes in your own JDK environment, but I do not

 

Do this :)

 

 

1. Set up openfire. If it is an installation file, install it directly. If it is an decompressed file, decompress it and run

 

After openfire.exe under openfire_3_4_3/openfire/bin is started, click luanch admin to go to configuration server

 

The default value can be used for other services, but it is best to use your own database. Make sure you have installed the database. MySQL is recommended.

 

Create a database named openfire. Next, you can start openfire and open the configured local database service.

 

2. Deploy mongochat, install jdk1.6, and then install Tomcat 6.0 to specify that JDK or JRE is the installed JDK 1.6.

 

In this tutorial, we will put WeChat chat. War under webapps for hot deployment and modify config. js.

 

VaR sitename = "computer ";//
Here is the domain name set for openfire

VaR backends =

[
{
Name: "Open relay ",
Description: "HTTP binding backend that allows connecting to any Jabber server ",
Httpbase: "/WeChat chat/JHB/", // the original value of the modified value is/JHB/

Type: "binding ",
Default_server: sitename
}
];

 

3. Open IE and type http: // COMPUTER: 8080/WeChat chat.
If everything goes well, you can log on to openfire.

 

I wish you all the best. The main purpose of this article is to remind you to pay attention to the use of software versions, because there are already many such articles on the Internet.

 

Note that the version is okay. Because the software is too large, you can only download WeChat chat. War.

 

Sorry for the inconvenience caused when you go online.

 

 

 

QQ: 83529101
MSN: mircle_wang@hotmail.com

 

 

If you encounter any problems during setup, please contact me. Good luck.

 

// Linux

For a Linux system, refer to the following URL:

Http://www.cnblogs.com/bluespot/archive/2008/07/17/1243164.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.