activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r467586 - in /incubator/activemq/sandbox/activemq-xmpp: ./ src/main/java/org/apache/activemq/transport/xmpp/ src/main/resources/
Date Wed, 25 Oct 2006 09:15:36 GMT
Author: jstrachan
Date: Wed Oct 25 02:15:35 2006
New Revision: 467586

URL: http://svn.apache.org/viewvc?view=rev&rev=467586
Log:
patches so that the Spark client can create a new chatroom and start talking to activemq.
Still not quite got the querying of available queues/topics figured out yet but getting closer....

Added:
    incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd   (with props)
    incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd   (with props)
    incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd   (with props)
    incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd   (with props)
Modified:
    incubator/activemq/sandbox/activemq-xmpp/pom.xml
    incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
    incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java

Modified: incubator/activemq/sandbox/activemq-xmpp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/pom.xml?view=diff&rev=467586&r1=467585&r2=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/pom.xml (original)
+++ incubator/activemq/sandbox/activemq-xmpp/pom.xml Wed Oct 25 02:15:35 2006
@@ -126,11 +126,11 @@
     </dependency>
 
     <dependency>
-        <groupId>org.codehaus.woodstox</groupId>
-        <!--<groupId>woodstox</groupId>-->
-        <artifactId>wstx-asl</artifactId>
-        <version>3.0.1</version>
-        <!--<version>3.1-rc1</version>-->
+      <groupId>org.codehaus.woodstox</groupId>
+      <!--<groupId>woodstox</groupId>-->
+      <artifactId>wstx-asl</artifactId>
+      <version>3.0.1</version>
+      <!--<version>3.1-rc1</version>-->
     </dependency>
 
     <dependency>
@@ -194,6 +194,19 @@
       <plugin>
         <groupId>org.jvnet.jaxb2.maven2</groupId>
         <artifactId>maven-jaxb2-plugin</artifactId>
+        <dependencies>
+          <dependency>
+            <groupId>net.java.dev.jaxb2-commons</groupId>
+            <artifactId>jaxb-fluent-api</artifactId>
+            <version>2.0.1</version>
+            <exclusions>
+              <exclusion>
+                <groupId>com.sun.xml</groupId>
+                <artifactId>jaxb-xjc</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+        </dependencies>
         <executions>
           <execution>
             <goals>
@@ -204,12 +217,15 @@
         <configuration>
           <strict>false</strict>
           <verbose>false</verbose>
-          <!--
           <args>
-            <arg>-XtoString</arg>
-            <arg>-Xequals</arg>
-            <arg>-XhashCode</arg>
+            <!--<arg value="-Xfluent-api"/>-->
           </args>
+            <!--
+               <arg>-XtoString</arg>
+              <arg>-Xequals</arg>
+              <arg>-XhashCode</arg>
+            -->
+          <!--
           <schemasExcludes>
             <exclude>delimiter.xsd</exclude>
           </schemasExcludes>

Modified: incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java?view=diff&rev=467586&r1=467585&r2=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
(original)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
Wed Oct 25 02:15:35 2006
@@ -35,9 +35,14 @@
 import org.apache.activemq.util.LongSequenceGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.jabber.protocol.disco_info.Feature;
+import org.jabber.protocol.disco_info.Identity;
+import org.jabber.protocol.disco_items.Item;
+import org.jabber.protocol.muc_user.X;
 import org.w3c.dom.Element;
 
 import javax.jms.JMSException;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.List;
@@ -110,6 +115,11 @@
                 onIq(event);
             }
         });
+        registry.registerHandler(Presence.class, new Handler<Presence>() {
+            public void handle(Presence event) throws Exception {
+                onPresence(event);
+            }
+        });
     }
 
     public void onXmppCommand(Object command) throws Exception {
@@ -149,12 +159,10 @@
     protected void onIq(final Iq iq) throws Exception {
         Object any = iq.getAny();
 
-        log.debug("Received Iq");
-
         if (any instanceof Query) {
             Query query = (Query) any;
             if (log.isDebugEnabled()) {
-                log.debug("Iq Query: " + query.getResource() + " username: " + query.getUsername());
+                log.debug("Iq Auth Query " + debugString(iq) + " resource: " + query.getResource()
+ " username: " + query.getUsername());
             }
             if (query.getPassword() == null) {
                 Iq result = createResult(iq);
@@ -201,28 +209,11 @@
             });
 
         }
-        else if (any instanceof Presence) {
-            Presence presence = (Presence) any;
-
-            if (log.isDebugEnabled()) {
-                log.debug("Presence: " + presence.getFrom() + " showOrStatusOrPriority: "
+ presence.getShowOrStatusOrPriority());
-            }
-
-            /*
-            Iq result = createResult(iq);
-            Presence answer = new Presence();
-            answer.setFrom(transport.getFrom());
-            answer.setType("");
-            result.setAny(answer);
-            transport.marshall(result);
-            */
-
-        }
         else if (any instanceof jabber.iq._private.Query) {
             jabber.iq._private.Query query = (jabber.iq._private.Query) any;
 
             if (log.isDebugEnabled()) {
-                log.debug("Private: " + query.getAny());
+                log.debug("Iq Private " + debugString(iq) + " any: " + query.getAny());
             }
 
             Iq result = createResult(iq);
@@ -234,7 +225,7 @@
             jabber.iq.roster.Query query = (jabber.iq.roster.Query) any;
 
             if (log.isDebugEnabled()) {
-                log.debug("Roster: " + query.getItem());
+                log.debug("Iq Roster " + debugString(iq) + " item: " + query.getItem());
             }
 
             Iq result = createResult(iq);
@@ -243,39 +234,18 @@
             transport.marshall(result);
         }
         else if (any instanceof org.jabber.protocol.disco_items.Query) {
-            org.jabber.protocol.disco_items.Query query = (org.jabber.protocol.disco_items.Query)
any;
-
-            if (log.isDebugEnabled()) {
-                log.debug("Disco Items query node: " + query.getNode() + " item: " + query.getItem());
-            }
-
-            Iq result = createResult(iq);
-            org.jabber.protocol.disco_items.Query roster = new org.jabber.protocol.disco_items.Query();
-            result.setAny(roster);
-            transport.marshall(result);
+            onDiscoItems(iq, (org.jabber.protocol.disco_items.Query) any);
         }
         else if (any instanceof org.jabber.protocol.disco_info.Query) {
-            org.jabber.protocol.disco_info.Query query = (org.jabber.protocol.disco_info.Query)
any;
-
-            if (log.isDebugEnabled()) {
-                log.debug("Disco Info query node: " + query.getNode() + " features: " + query.getFeature()
+ " identity: " + query.getIdentity());
-            }
-
-            Iq result = createResult(iq);
-            org.jabber.protocol.disco_info.Query answer = new org.jabber.protocol.disco_info.Query();
-            // TODO
-            //answer.getFeature().add(new Conference)
-
-            result.setAny(answer);
-            transport.marshall(result);
+            onDiscoInfo(iq, (org.jabber.protocol.disco_info.Query) any);
         }
         else {
             if (any instanceof Element) {
                 Element element = (Element) any;
-                log.warn("Unknown Id element namespace: " + element.getNamespaceURI() + "
localName: " + element.getLocalName());
+                log.warn("Iq Unknown " + debugString(iq) + " element namespace: " + element.getNamespaceURI()
+ " localName: " + element.getLocalName());
             }
             else {
-                log.warn("Unknown Id: " + any + " of type: " + any.getClass().getName());
+                log.warn("Iq Unknown " + debugString(iq) + " any: " + any + " of type: "
+ any.getClass().getName());
             }
             Iq result = createResult(iq);
             jabber.client.Error error = new Error();
@@ -283,6 +253,118 @@
             result.setAny(error);
             transport.marshall(result);
         }
+    }
+
+    protected String debugString(Iq iq) {
+        return " to: " + iq.getTo() + " type: " + iq.getType() + " from: " + iq.getFrom()
+ " id: " + iq.getId();
+    }
+
+    protected void onDiscoItems(Iq iq, org.jabber.protocol.disco_items.Query query) throws
IOException {
+        String to = iq.getTo();
+
+        if (log.isDebugEnabled()) {
+            log.debug("Iq Disco Items query " + debugString(iq) + " node: " + query.getNode()
+ " item: " + query.getItem());
+        }
+
+        Iq result = createResult(iq);
+        org.jabber.protocol.disco_items.Query answer = new org.jabber.protocol.disco_items.Query();
+        if (to == null || to.length() == 0) {
+            answer.getItem().add(createItem("queues", "Queues", "queues"));
+            answer.getItem().add(createItem("topics", "Topics", "topics"));
+        }
+        else {
+            // lets not add anything?
+        }
+
+        result.setAny(answer);
+        transport.marshall(result);
+    }
+
+    protected void onDiscoInfo(Iq iq, org.jabber.protocol.disco_info.Query query) throws
IOException {
+        String to = iq.getTo();
+
+        // TODO lets create the topic 'to'
+
+        if (log.isDebugEnabled()) {
+            log.debug("Iq Disco Info query " + debugString(iq) + " node: " + query.getNode()
+ " features: " + query.getFeature() + " identity: " + query.getIdentity());
+        }
+
+        Iq result = createResult(iq);
+        org.jabber.protocol.disco_info.Query answer = new org.jabber.protocol.disco_info.Query();
+        answer.setNode(to);
+        answer.getFeature().add(createFeature("http://jabber.org/protocol/disco#info"));
+        answer.getFeature().add(createFeature("http://jabber.org/protocol/disco#items"));
+        if (to == null || to.length() == 0) {
+            answer.getIdentity().add(createIdentity("directory", "chatroom", "queues"));
+            answer.getIdentity().add(createIdentity("directory", "chatroom", "topics"));
+            /*
+            answer.getIdentity().add(createIdentity("hierarchy", "queues", "branch"));
+            answer.getIdentity().add(createIdentity("hierarchy", "topics", "branch"));
+            */
+        }
+        else {
+            // for queues/topics
+            if (to.equals("queues")) {
+                answer.getIdentity().add(createIdentity("conference", "queue.a", "text"));
+                answer.getIdentity().add(createIdentity("conference", "queue.b", "text"));
+            }
+            else if (to.equals("topics")) {
+                answer.getIdentity().add(createIdentity("conference", "topic.x", "text"));
+                answer.getIdentity().add(createIdentity("conference", "topic.y", "text"));
+                answer.getIdentity().add(createIdentity("conference", "topic.z", "text"));
+            }
+            else {
+                // lets reply to an actual room
+                answer.getIdentity().add(createIdentity("conference", to, "text"));
+                answer.getFeature().add(createFeature("http://jabber.org/protocol/muc"));
+                answer.getFeature().add(createFeature("muc-open"));
+            }
+        }
+
+        result.setAny(answer);
+        transport.marshall(result);
+    }
+
+    protected void onPresence(Presence presence) throws IOException {
+        if (log.isDebugEnabled()) {
+            log.debug("Presence: " + presence.getFrom() + " id: " + presence.getId() + "
to: " + presence.getTo() + " type: " + presence.getType()
+                    + " showOrStatusOrPriority: " + presence.getShowOrStatusOrPriority()
+ " any: " + presence.getAny());
+        }
+        Presence answer = new Presence();
+        answer.setFrom(presence.getTo());
+        answer.setType(presence.getType());
+        answer.setTo(presence.getFrom());
+        X x = new X();
+        org.jabber.protocol.muc_user.Item item = new org.jabber.protocol.muc_user.Item();
+        item.setAffiliation("owner");
+        item.setRole("moderator");
+        item.setNick("broker");
+        x.getDeclineOrDestroyOrInvite().add(item);
+        answer.getShowOrStatusOrPriority().add(x);
+        transport.marshall(answer);
+    }
+
+
+    protected Item createItem(String jid, String name, String node) {
+        Item answer = new Item();
+        answer.setJid(jid);
+        answer.setName(name);
+        answer.setNode(node);
+        return answer;
+    }
+
+    protected Identity createIdentity(String category, String type, String name) {
+        Identity answer = new Identity();
+        answer.setCategory(category);
+        answer.setName(name);
+        answer.setType(type);
+        return answer;
+    }
+
+    protected Feature createFeature(String var) {
+        Feature feature = new Feature();
+        feature.setVar(var);
+        return feature;
     }
 
     /**

Modified: incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java?view=diff&rev=467586&r1=467585&r2=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
(original)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
Wed Oct 25 02:15:35 2006
@@ -255,6 +255,8 @@
                 + ":org.jabber.etherx.streams" + ":org.jabber.protocol.activity" + ":org.jabber.protocol.address"
                 + ":org.jabber.protocol.amp" + ":org.jabber.protocol.amp_errors"
                 + ":org.jabber.protocol.disco_info" + ":org.jabber.protocol.disco_items"
+                + ":org.jabber.protocol.muc" + ":org.jabber.protocol.muc_admin"
+                + ":org.jabber.protocol.muc_unique" + ":org.jabber.protocol.muc_user"
                 + ":ietf.params.xml.ns.xmpp_sasl" + ":ietf.params.xml.ns.xmpp_stanzas"
                 + ":ietf.params.xml.ns.xmpp_streams" + ":ietf.params.xml.ns.xmpp_tls");
 

Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd?view=auto&rev=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd Wed Oct 25 02:15:35
2006
@@ -0,0 +1,74 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    targetNamespace='http://jabber.org/protocol/muc#admin'
+    xmlns='http://jabber.org/protocol/muc#admin'
+    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='query'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='item' maxOccurs='unbounded'/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='item'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='actor' minOccurs='0'/>
+        <xs:element ref='reason' minOccurs='0'/>
+      </xs:sequence>
+      <xs:attribute name='affiliation' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='admin'/>
+            <xs:enumeration value='member'/>
+            <xs:enumeration value='none'/>
+            <xs:enumeration value='outcast'/>
+            <xs:enumeration value='owner'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+      <xs:attribute name='jid' type='xs:string' use='optional'/>
+      <xs:attribute name='nick' type='xs:string' use='optional'/>
+      <xs:attribute name='role' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='moderator'/>
+            <xs:enumeration value='none'/>
+            <xs:enumeration value='participant'/>
+            <xs:enumeration value='visitor'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='actor'>
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base='empty'>
+          <xs:attribute name='jid' type='xs:string' use='required'/>
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='reason' type='xs:string'/>
+
+  <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/muc-admin.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-admin.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd?view=auto&rev=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd Wed Oct 25
02:15:35 2006
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    targetNamespace='http://jabber.org/protocol/muc#unique'
+    xmlns='http://jabber.org/protocol/muc#unique'
+    elementFormDefault='qualified'>
+
+  <xs:annotation>
+    <xs:documentation>
+      The protocol documented by this schema is defined in
+      XEP-0045: http://www.xmpp.org/extensions/xep-0045.html
+    </xs:documentation>
+  </xs:annotation>
+
+  <xs:element name='unique' type='xs:string'/>
+
+</xs:schema>

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-unique.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd?view=auto&rev=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd Wed Oct 25 02:15:35
2006
@@ -0,0 +1,121 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    targetNamespace='http://jabber.org/protocol/muc#user'
+    xmlns='http://jabber.org/protocol/muc#user'
+    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='x'>
+    <xs:complexType>
+      <xs:choice minOccurs='0' maxOccurs='unbounded'>
+        <xs:element ref='decline' minOccurs='0'/>
+        <xs:element ref='destroy' minOccurs='0'/>
+        <xs:element ref='invite' minOccurs='0' maxOccurs='unbounded'/>
+        <xs:element ref='item' minOccurs='0'/>
+        <xs:element name='password' type='xs:string' minOccurs='0'/>
+        <xs:element ref='status' minOccurs='0'/>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='decline'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='reason' minOccurs='0'/>
+      </xs:sequence>
+      <xs:attribute name='from' type='xs:string' use='optional'/>
+      <xs:attribute name='to' type='xs:string' use='optional'/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='destroy'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='reason' minOccurs='0'/>
+      </xs:sequence>
+      <xs:attribute name='jid' type='xs:string' use='optional'/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='invite'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='reason' minOccurs='0'/>
+      </xs:sequence>
+      <xs:attribute name='from' type='xs:string' use='optional'/>
+      <xs:attribute name='to' type='xs:string' use='optional'/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='item'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='actor' minOccurs='0'/>
+        <xs:element ref='reason' minOccurs='0'/>
+        <xs:element name='continue' type='empty' minOccurs='0'/>
+      </xs:sequence>
+      <xs:attribute name='affiliation' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='admin'/>
+            <xs:enumeration value='member'/>
+            <xs:enumeration value='none'/>
+            <xs:enumeration value='outcast'/>
+            <xs:enumeration value='owner'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+      <xs:attribute name='jid' type='xs:string' use='optional'/>
+      <xs:attribute name='nick' type='xs:string' use='optional'/>
+      <xs:attribute name='role' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='moderator'/>
+            <xs:enumeration value='none'/>
+            <xs:enumeration value='participant'/>
+            <xs:enumeration value='visitor'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='actor'>
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base='empty'>
+          <xs:attribute name='jid' type='xs:string' use='required'/>
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='status'>
+    <xs:complexType>
+      <xs:attribute name='code' use='required'>
+        <xs:simpleType>
+          <xs:restriction base='xs:int'>
+            <xs:length value='3'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='reason' type='xs:string'/>
+
+  <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/muc-user.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc-user.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd?view=auto&rev=467586
==============================================================================
--- incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd (added)
+++ incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd Wed Oct 25 02:15:35
2006
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xs:schema
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    targetNamespace='http://jabber.org/protocol/muc'
+    xmlns='http://jabber.org/protocol/muc'
+    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='x'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='history' minOccurs='0'/>
+        <xs:element name='password' type='xs:string' minOccurs='0'/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='history'>
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base='empty'>
+         <xs:attribute name='maxchars' type='xs:int' use='optional'/>
+         <xs:attribute name='maxstanzas' type='xs:int' use='optional'/>
+         <xs:attribute name='seconds' type='xs:int' use='optional'/>
+         <xs:attribute name='since' type='xs:dateTime' use='optional'/>
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+
+  <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/muc.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/sandbox/activemq-xmpp/src/main/resources/muc.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message