jaxmpp2
Universal library for the client-side programming.
The library can be used to write standalone, desktop Java clients, clients for testing servers, including load tests, as well as web chat clients based on GWT framework and mobile clients supporting Java like Android based mobiles.
Public repository is located at the address: https://svn.tigase.org/reps/jaxmpp2/
To download and start using the library use following command:
svn co https://svn.tigase.org/reps/jaxmpp2/trunk jaxmpp2
To compile, enter the jaxmpp2 directory and run:
mvn package
Extremely simple client sending a single message in Groovy:
{syntaxhighlighter brush: groovy;fontsize: 100; first-line: 1; }import tigase.jaxmpp.core.client.*
import tigase.jaxmpp.core.client.xmpp.*
import tigase.jaxmpp.core.client.xmpp.stanzas.*
import tigase.jaxmpp.core.client.xmpp.modules.*
import tigase.jaxmpp.j2se.*
Jaxmpp tester = new Jaxmpp()
tester.getProperties().
setUserProperty(BoshConnector.BOSH_SERVICE_URL,
"http://www.tigase.im/http-bind/")
tester.getProperties().setUserProperty(SessionObject.USER_JID,
JID.jidInstance("test_1@test.domain"))
tester.getProperties().setUserProperty(SessionObject.PASSWORD,
"user password")
println("Loging in...")
tester.login()
println("Sending message...")
tester.sendMessage(JID.jidInstance("user@test.domain"),
"Test", "This is a test")
println("Sleeping...")
Thread.sleep(10000)
println("Disconnecting...")
tester.disconnect()
println("END.")
{/syntaxhighlighter}
- Add new comment
- 2979 reads
Printer-friendly version- Send by email






tigase-xmltools dependency, jaxmpp-core dependency
Build instructions should be something like:
1. svn co https://svn.tigase.org/reps/jaxmpp2/trunk jaxmpp2
2. svn co https://svn.tigase.org/reps/tigase-xmltools/trunk xmltools/
3. cd xmltools
4. mvn install
5. cd ../jaxmpp-core
6. mvn install
7. cd ../jaxmpp-j2se
8. mvn install package
xmltools should be pulled
xmltools should be pulled automatically by maven so there is not need to build it separately. Or it should not be needed.