You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/10/24 18:48:25 UTC
svn commit: r467379 [2/2] - in /incubator/activemq/sandbox/activemq-xmpp: ./
src/main/excluded-schemas/ src/main/java/org/apache/activemq/transport/xmpp/
src/main/java/org/apache/activemq/transport/xmpp/command/
src/main/resources/ src/main/resources/M...
Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd Tue Oct 24 09:48:24 2006
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='jabber:iq:version'
+ xmlns='jabber:iq:version'
+ elementFormDefault='qualified'>
+
+ <xs:annotation>
+ <xs:documentation>
+ The protocol documented by this schema is defined in
+ JEP-0092: http://www.jabber.org/jeps/jep-0092.html
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:element name='query'>
+ <xs:complexType>
+ <xs:sequence minOccurs='0'>
+ <xs:element name='name' type='xs:string' minOccurs='1'/>
+ <xs:element name='version' type='xs:string' minOccurs='1'/>
+ <xs:element name='os' type='xs:string' minOccurs='0'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/iq-version.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd Tue Oct 24 09:48:24 2006
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='jabber:iq:roster'
+ xmlns='jabber:iq:roster'
+ elementFormDefault='qualified'>
+
+ <xs:element name='query'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref='item'
+ minOccurs='0'
+ maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='item'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref='group'
+ minOccurs='0'
+ maxOccurs='unbounded'/>
+ </xs:sequence>
+ <xs:attribute name='ask' use='optional'>
+ <xs:simpleType>
+ <xs:restriction base='xs:NCName'>
+ <xs:enumeration value='subscribe'/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name='jid' type='xs:string' use='required'/>
+ <xs:attribute name='name' type='xs:string' use='optional'/>
+ <xs:attribute name='subscription' use='optional'>
+ <xs:simpleType>
+ <xs:restriction base='xs:NCName'>
+ <xs:enumeration value='both'/>
+ <xs:enumeration value='from'/>
+ <xs:enumeration value='none'/>
+ <xs:enumeration value='remove'/>
+ <xs:enumeration value='to'/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='group' type='xs:string'/>
+
+</xs:schema>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/roster.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd Tue Oct 24 09:48:24 2006
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='storage:rosternotes'
+ xmlns='storage:rosternotes'
+ elementFormDefault='qualified'>
+
+ <xs:annotation>
+ <xs:documentation>
+ The protocol documented by this schema is defined in
+ JEP-0045: http://www.jabber.org/jeps/jep-0045.html
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:element name='storage'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref='note' minOccurs='0' maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='note'>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base='xs:string'>
+ <xs:attribute name='jid' type='xs:string' use='required'/>
+ <xs:attribute name='cdate' type='xs:dateTime' use='optional'/>
+ <xs:attribute name='mdate' type='xs:dateTime' use='optional'/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosternotes.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd Tue Oct 24 09:48:24 2006
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='http://jabber.org/protocol/rosterx'
+ xmlns='http://jabber.org/protocol/rosterx'
+ elementFormDefault='qualified'>
+
+ <xs:annotation>
+ <xs:documentation>
+ The protocol documented by this schema is defined in
+ JEP-0144: http://www.jabber.org/jeps/jep-0144.html
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:element name='x'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref='item' minOccurs='1' maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='item'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name='group' type='xs:string' minOccurs='0' maxOccurs='unbounded'/>
+ </xs:sequence>
+ <xs:attribute name='action' use='optional'>
+ <xs:simpleType>
+ <xs:restriction base='xs:NCName' default='add'>
+ <xs:enumeration value='add'/>
+ <xs:enumeration value='delete'/>
+ <xs:enumeration value='modify'/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name='jid' type='xs:string' use='required'/>
+ <xs:attribute name='name' type='xs:string' use='optional'/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/rosterx.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/sasl.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/sasl.xsd?view=diff&rev=467379&r1=467378&r2=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/sasl.xsd (original)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/sasl.xsd Tue Oct 24 09:48:24 2006
@@ -1,15 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
- xmlns:xs='http://www.w3.org/2001/XMLSchema'
- targetNamespace='urn:ietf:params:xml:ns:xmpp-sasl'
- xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
- elementFormDefault='qualified'>
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='urn:ietf:params:xml:ns:xmpp-sasl'
+ xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
+ elementFormDefault='qualified'>
<xs:element name='mechanisms'>
<xs:complexType>
<xs:sequence>
- <xs:element name='mechanism'
+ <xs:element name='mechanism'
maxOccurs='unbounded'
type='xs:string'/>
</xs:sequence>
@@ -28,10 +28,41 @@
</xs:complexType>
</xs:element>
+ <xs:element name='challenge'>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base='xs:string'/>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='response'>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base='xs:string'/>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='success'>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base='xs:string'/>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='abort'>
+ <xs:complexType>
+ </xs:complexType>
+ </xs:element>
+
+ <!--
<xs:element name='challenge' type='xs:string'/>
<xs:element name='response' type='xs:string'/>
<xs:element name='abort' type='empty'/>
<xs:element name='success' type='xs:string'/>
+ -->
<xs:element name='failure'>
<xs:complexType>
Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd Tue Oct 24 09:48:24 2006
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='urn:ietf:params:xml:ns:xmpp-session'
+ xmlns='urn:ietf:params:xml:ns:xmpp-session'
+ elementFormDefault='qualified'>
+
+ <xs:element name='session' type='empty'/>
+
+ <xs:simpleType name='empty'>
+ <xs:restriction base='xs:string'>
+ <xs:enumeration value=''/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/session.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/streams.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/streams.xsd?view=diff&rev=467379&r1=467378&r2=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/streams.xsd (original)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/streams.xsd Tue Oct 24 09:48:24 2006
@@ -1,10 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
- xmlns:xs='http://www.w3.org/2001/XMLSchema'
- targetNamespace='http://etherx.jabber.org/streams'
- xmlns='http://etherx.jabber.org/streams'
- elementFormDefault='unqualified'>
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ targetNamespace='http://etherx.jabber.org/streams'
+ xmlns='http://etherx.jabber.org/streams'
+ elementFormDefault='unqualified'
+ jaxb:version="2.0">
<xs:import namespace='jabber:client'
schemaLocation='jabber-client.xsd'/>
@@ -25,17 +27,39 @@
xmlns:server='jabber:server'
xmlns:db='jabber:server:dialback'>
<xs:element ref='features' minOccurs='0' maxOccurs='1'/>
- <xs:any namespace='urn:ietf:params:xml:ns:xmpp-tls'
+ <xs:any jaxb:property="" namespace='urn:ietf:params:xml:ns:xmpp-tls'
minOccurs='0'
- maxOccurs='unbounded'/>
+ maxOccurs='unbounded'>
+
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:property name="tls"/>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:any>
<xs:any namespace='urn:ietf:params:xml:ns:xmpp-sasl'
minOccurs='0'
- maxOccurs='unbounded'/>
+ maxOccurs='unbounded'>
+
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:property name="sasl"/>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:any>
+
+ <!--
<xs:choice minOccurs='0' maxOccurs='1'>
<xs:choice minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='client:message'/>
<xs:element ref='client:presence'/>
<xs:element ref='client:iq'/>
+
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:property name="clientMessages"/>
+ </xs:appinfo>
+ </xs:annotation>
</xs:choice>
<xs:choice minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='server:message'/>
@@ -43,8 +67,25 @@
<xs:element ref='server:iq'/>
<xs:element ref='db:result'/>
<xs:element ref='db:verify'/>
+
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:property name="serverMessages"/>
+ </xs:appinfo>
+ </xs:annotation>
</xs:choice>
</xs:choice>
+ -->
+ <xs:choice minOccurs='0' maxOccurs='unbounded'>
+ <xs:element ref='client:message'/>
+ <xs:element ref='client:presence'/>
+ <xs:element ref='client:iq'/>
+ <xs:element ref='server:message'/>
+ <xs:element ref='server:presence'/>
+ <xs:element ref='server:iq'/>
+ <xs:element ref='db:result'/>
+ <xs:element ref='db:verify'/>
+ </xs:choice>
<xs:element ref='error' minOccurs='0' maxOccurs='1'/>
</xs:sequence>
<xs:attribute name='from' type='xs:string' use='optional'/>
@@ -65,8 +106,8 @@
<xs:element name='error'>
<xs:complexType>
- <xs:sequence xmlns:err='urn:ietf:params:xml:ns:xmpp-streams'>
- <xs:group ref='err:streamErrorGroup'/>
+ <xs:sequence xmlns:err='urn:ietf:params:xml:ns:xmpp-streams'>
+ <xs:group ref='err:streamErrorGroup'/>
<xs:element ref='err:text'
minOccurs='0'
maxOccurs='1'/>
Modified: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/tls.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/tls.xsd?view=diff&rev=467379&r1=467378&r2=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/tls.xsd (original)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/tls.xsd Tue Oct 24 09:48:24 2006
@@ -18,8 +18,20 @@
</xs:complexType>
</xs:element>
+ <xs:element name='proceed'>
+ <xs:complexType>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name='failure'>
+ <xs:complexType>
+ </xs:complexType>
+ </xs:element>
+
+ <!--
<xs:element name='proceed' type='empty'/>
<xs:element name='failure' type='empty'/>
+ -->
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
Added: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java Tue Oct 24 09:48:24 2006
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.transport.xmpp;
+
+import org.apache.activemq.Service;
+import org.apache.activemq.broker.BrokerService;
+
+/**
+ * @version $Revision$
+ */
+public class XmppBroker implements Service {
+ private BrokerService broker = new BrokerService();
+
+ public static void main(String[] args) {
+ try {
+ XmppBroker broker = new XmppBroker();
+ broker.start();
+
+ System.out.println("Press any key to terminate");
+ System.in.read();
+ }
+ catch (Exception e) {
+ System.out.println("Caught: " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public void start() throws Exception {
+ broker.setPersistent(false);
+ broker.setUseJmx(false);
+ broker.addConnector("xmpp://localhost:61222");
+ broker.start();
+ }
+
+ public void stop() throws Exception {
+ broker.stop();
+ }
+}
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java Tue Oct 24 09:48:24 2006
@@ -0,0 +1,72 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.transport.xmpp;
+
+import junit.framework.TestCase;
+import org.jivesoftware.smack.Chat;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.XMPPConnection;
+
+/**
+ * @version $Revision$
+ */
+public class XmppTest extends TestCase {
+
+ private XmppBroker broker = new XmppBroker();
+ private boolean block = false;
+
+ public void testConnect() throws Exception {
+ //ConnectionConfiguration config = new ConnectionConfiguration("localhost", 61222);
+ //config.setDebuggerEnabled(true);
+
+ try {
+ //SmackConfiguration.setPacketReplyTimeout(1000);
+ //XMPPConnection con = new XMPPConnection(config);
+ XMPPConnection con = new XMPPConnection("localhost", 61222);
+ con.login("amq-user", "amq-pwd");
+ Chat chat = con.createChat("test@localhost");
+ for (int i = 0; i < 1000; i++) {
+ System.out.println("Sending message: " + i);
+ chat.sendMessage("Hello from Message: " + i);
+ }
+ System.out.println("Sent all messages!");
+ }
+ catch (XMPPException e) {
+ System.out.println("Caught: " + e);
+ e.printStackTrace();
+ }
+ if (block) {
+ Thread.sleep(20000);
+ System.out.println("Press any key to quit!: ");
+ System.in.read();
+ }
+ System.out.println("Done!");
+ }
+
+
+ @Override
+ protected void setUp() throws Exception {
+ broker.start();
+ }
+
+
+ @Override
+ protected void tearDown() throws Exception {
+ broker.stop();
+ }
+}
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml Tue Oct 24 09:48:24 2006
@@ -0,0 +1,12 @@
+<?xml version='1.0'?>
+<stream:stream
+ to='example.com'
+ xmlns='jabber:client'
+ xmlns:stream='http://etherx.jabber.org/streams'
+ version='1.0'>
+
+ <message xml:lang='en'>
+ <body>Hello world!</body>
+ </message>
+
+</stream:stream>
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/example-xmpp.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties?view=auto&rev=467379
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties Tue Oct 24 09:48:24 2006
@@ -0,0 +1,29 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see debug output on the console.
+#
+log4j.rootLogger=INFO, out
+
+log4j.logger.org.apache.activemq=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/activemq/sandbox/activemq-xmpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain