Author: ngn Date: Fri Dec 4 12:30:06 2009 New Revision: 887171 URL: http://svn.apache.org/viewvc?rev=887171&view=rev Log: Remove the use of addNamespaceAttribute(String) from most places as it is no longer needed
Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/authorization/AuthorizationResponses.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/bind/handler/BindIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0054_vcardtemp/VcardTempIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0092_software_version/SoftwareVersionIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeXEP0090IQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterStanzaUtils.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoInfoIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoItemIQHandler.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerErrorResponses.java mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerResponses.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/stanzasession/StanzaSessionTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/authorization/PlainTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AbortHandlerTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerPlainMechanismTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerUnavailableMechanismTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/starttls/handler/StartTLSHandlerTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/roster/handler/RosterIQHandlerTestCase.java mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/SubscriberPayloadNotificationVisitor.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubPublishHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveAffiliationsHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveSubscriptionsHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubSubscribeHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubUnsubscribeHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/owner/PubSubOwnerManageAffiliationsHandler.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoInfoTestCase.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoItemsTestCase.java mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/AbstractStanzaGenerator.java Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/authorization/AuthorizationResponses.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/authorization/AuthorizationResponses.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/authorization/AuthorizationResponses.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/authorization/AuthorizationResponses.java Fri Dec 4 12:30:06 2009 @@ -32,8 +32,7 @@ public class AuthorizationResponses { public Stanza getSuccess() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("success"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + StanzaBuilder stanzaBuilder = new StanzaBuilder("success", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); return stanzaBuilder.build(); } @@ -42,7 +41,7 @@ } public Stanza getFailure(SASLFailureType failureType) { - return new StanzaBuilder("failure").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) + return new StanzaBuilder("failure", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) .startInnerElement(failureType.value()).endInnerElement().build(); } public Stanza getFailureMalformedRequest() { Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/bind/handler/BindIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/bind/handler/BindIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/bind/handler/BindIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/core/bind/handler/BindIQHandler.java Fri Dec 4 12:30:06 2009 @@ -72,9 +72,9 @@ StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.RESULT, stanza.getID()). - startInnerElement("bind"). - addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_BIND). - startInnerElement("jid").addText(entity.getFullQualifiedName()).endInnerElement(). + startInnerElement("bind", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_BIND). + startInnerElement("jid", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_BIND). + addText(entity.getFullQualifiedName()).endInnerElement(). endInnerElement(); return stanzaBuilder.build(); Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0054_vcardtemp/VcardTempIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0054_vcardtemp/VcardTempIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0054_vcardtemp/VcardTempIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0054_vcardtemp/VcardTempIQHandler.java Fri Dec 4 12:30:06 2009 @@ -112,13 +112,13 @@ if (vcardXml == null) { IQStanzaType iqStanzaType = returnEmptyVCardWhenNonExistent ? IQStanzaType.RESULT : IQStanzaType.ERROR; StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), iqStanzaType, stanza.getID()); - stanzaBuilder.startInnerElement("vCard").addNamespaceAttribute(NamespaceURIs.VCARD_TEMP).endInnerElement(); + stanzaBuilder.startInnerElement("vCard", NamespaceURIs.VCARD_TEMP).endInnerElement(); if (returnEmptyVCardWhenNonExistent) { // keep it like it is } else { stanzaBuilder. startInnerElement("error").addAttribute("type", "cancel"). - startInnerElement("item-not-found").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS). + startInnerElement("item-not-found", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS). endInnerElement(). endInnerElement(); } Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0092_software_version/SoftwareVersionIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0092_software_version/SoftwareVersionIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0092_software_version/SoftwareVersionIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0092_software_version/SoftwareVersionIQHandler.java Fri Dec 4 12:30:06 2009 @@ -55,12 +55,11 @@ protected Stanza handleGet(IQStanza stanza, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()). - startInnerElement("query"). - addNamespaceAttribute(NamespaceURIs.JABBER_IQ_VERSION). + startInnerElement("query", NamespaceURIs.JABBER_IQ_VERSION). - startInnerElement("name").addText("Apache Vysper XMPP Server").endInnerElement(). - startInnerElement("version").addText("0.1 beta").endInnerElement(). - startInnerElement("os").addText(OS_VERSION).endInnerElement(). + startInnerElement("name", NamespaceURIs.JABBER_IQ_VERSION).addText("Apache Vysper XMPP Server").endInnerElement(). + startInnerElement("version", NamespaceURIs.JABBER_IQ_VERSION).addText("0.1 beta").endInnerElement(). + startInnerElement("os", NamespaceURIs.JABBER_IQ_VERSION).addText(OS_VERSION).endInnerElement(). endInnerElement(); Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeIQHandler.java Fri Dec 4 12:30:06 2009 @@ -64,11 +64,10 @@ String utcTime = DateTimeProfile.getInstance().getDateTimeInUTC(now); StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()). - startInnerElement("time"). - addNamespaceAttribute(NamespaceURIs.URN_XMPP_TIME). + startInnerElement("time", NamespaceURIs.URN_XMPP_TIME). - startInnerElement("tzo").addText(timeZone).endInnerElement(). - startInnerElement("utc").addText(utcTime).endInnerElement(). + startInnerElement("tzo", NamespaceURIs.URN_XMPP_TIME).addText(timeZone).endInnerElement(). + startInnerElement("utc", NamespaceURIs.URN_XMPP_TIME).addText(utcTime).endInnerElement(). endInnerElement(); Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeXEP0090IQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeXEP0090IQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeXEP0090IQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0202_entity_time/EntityTimeXEP0090IQHandler.java Fri Dec 4 12:30:06 2009 @@ -74,12 +74,11 @@ String displayTime = localDateFormatter.format(now); StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()). - startInnerElement("query"). - addNamespaceAttribute(NamespaceURIs.JABBER_IQ_TIME). + startInnerElement("query", NamespaceURIs.JABBER_IQ_TIME). - startInnerElement("utc").addText(utcTime).endInnerElement(). - startInnerElement("tz").addText(timeZone).endInnerElement(). - startInnerElement("display").addText(displayTime).endInnerElement(). + startInnerElement("utc", NamespaceURIs.JABBER_IQ_TIME).addText(utcTime).endInnerElement(). + startInnerElement("tz", NamespaceURIs.JABBER_IQ_TIME).addText(timeZone).endInnerElement(). + startInnerElement("display", NamespaceURIs.JABBER_IQ_TIME).addText(displayTime).endInnerElement(). endInnerElement(); Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterStanzaUtils.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterStanzaUtils.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterStanzaUtils.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterStanzaUtils.java Fri Dec 4 12:30:06 2009 @@ -36,8 +36,7 @@ public static StanzaBuilder createRosterItemsIQ(Entity to, String id, IQStanzaType type, Iterable<RosterItem> rosterItems) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, to, type, id). - startInnerElement("query"). - addNamespaceAttribute(NamespaceURIs.JABBER_IQ_ROSTER); + startInnerElement("query", NamespaceURIs.JABBER_IQ_ROSTER); for (RosterItem rosterItem : rosterItems) { createRosterItem(stanzaBuilder, rosterItem); @@ -59,7 +58,7 @@ } public static void createRosterItem(StanzaBuilder stanzaBuilder, RosterItem rosterItem) { - stanzaBuilder.startInnerElement("item"). + stanzaBuilder.startInnerElement("item", NamespaceURIs.JABBER_IQ_ROSTER). addAttribute("jid", rosterItem.getJid().getFullQualifiedName()); if (rosterItem.getName() != null) { stanzaBuilder.addAttribute("name", rosterItem.getName()); @@ -73,7 +72,7 @@ List<RosterGroup> groupList = rosterItem.getGroups(); if (groupList != null) { for (RosterGroup rosterGroup : groupList) { - stanzaBuilder.startInnerElement("group"). + stanzaBuilder.startInnerElement("group", NamespaceURIs.JABBER_IQ_ROSTER). addText(rosterGroup.getName()). endInnerElement(); } Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoInfoIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoInfoIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoInfoIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoInfoIQHandler.java Fri Dec 4 12:30:06 2009 @@ -137,8 +137,7 @@ // render the stanza with information collected StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(to, stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()). - startInnerElement("query"). - addNamespaceAttribute(NamespaceURIs.XEP0030_SERVICE_DISCOVERY_INFO); + startInnerElement("query", NamespaceURIs.XEP0030_SERVICE_DISCOVERY_INFO); if (node != null) { stanzaBuilder.addAttribute("node", node); } Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoItemIQHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoItemIQHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoItemIQHandler.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/modules/servicediscovery/handler/DiscoItemIQHandler.java Fri Dec 4 12:30:06 2009 @@ -118,8 +118,7 @@ // render the stanza with information collected StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(to, stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()). - startInnerElement("query"). - addNamespaceAttribute(NamespaceURIs.XEP0030_SERVICE_DISCOVERY_ITEMS); + startInnerElement("query", NamespaceURIs.XEP0030_SERVICE_DISCOVERY_ITEMS); if (node != null) { stanzaBuilder.addAttribute("node", node); } Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerErrorResponses.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerErrorResponses.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerErrorResponses.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerErrorResponses.java Fri Dec 4 12:30:06 2009 @@ -121,14 +121,12 @@ .addAttribute("type", type.value()); // insert defined error condition relating to the stanza error type - responseBuilder.startInnerElement(errorCondition.value()); - responseBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS); + responseBuilder.startInnerElement(errorCondition.value(), NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS); responseBuilder.endInnerElement(); // optional error text if (errorText != null && errorLang != null) { - responseBuilder.startInnerElement("text") - .addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS) + responseBuilder.startInnerElement("text", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS) .addAttribute(NamespaceURIs.XML, "lang", errorLang) .addText(errorText); } @@ -139,14 +137,12 @@ } public Stanza getTLSFailure() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("failure"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); + StanzaBuilder stanzaBuilder = new StanzaBuilder("failure", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); return stanzaBuilder.build(); } public Stanza getSASLFailure(SASLFailureType failureType) { - StanzaBuilder stanzaBuilder = new StanzaBuilder("failure"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + StanzaBuilder stanzaBuilder = new StanzaBuilder("failure", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); if (failureType != null) { stanzaBuilder.startInnerElement(failureType.toString()).endInnerElement(); } Modified: mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerResponses.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerResponses.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerResponses.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/response/ServerResponses.java Fri Dec 4 12:30:06 2009 @@ -119,15 +119,13 @@ public Stanza getTLSProceed() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("proceed"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); + StanzaBuilder stanzaBuilder = new StanzaBuilder("proceed", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); return stanzaBuilder.build(); } public Stanza getAuthAborted() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("aborted"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); + StanzaBuilder stanzaBuilder = new StanzaBuilder("aborted", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); return stanzaBuilder.build(); } Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/stanzasession/StanzaSessionTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/stanzasession/StanzaSessionTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/stanzasession/StanzaSessionTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/stanzasession/StanzaSessionTestCase.java Fri Dec 4 12:30:06 2009 @@ -78,9 +78,8 @@ assertNotNull(stanza); System.out.println(DenseStanzaLogRenderer.render(stanza)); session.send( - new StanzaBuilder("starttls") + new StanzaBuilder("starttls", "urn:ietf:params:xml:ns:xmpp-tls") .addAttribute("from", "m...@vysper.org") - .addNamespaceAttribute("urn:ietf:params:xml:ns:xmpp-tls") .build() ); stanza = waitForStanza(session); Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/authorization/PlainTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/authorization/PlainTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/authorization/PlainTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/authorization/PlainTestCase.java Fri Dec 4 12:30:06 2009 @@ -36,7 +36,7 @@ public void testPlainEmpty() throws XMLSemanticError { - Stanza stanza = new StanzaBuilder("plain").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL).build(); + Stanza stanza = new StanzaBuilder("plain", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL).build(); Stanza response = startMechanism(stanza); assertResponse(response, "malformed-request"); @@ -44,7 +44,7 @@ public void testPlainNonBASE64() throws XMLSemanticError { - Stanza stanza = new StanzaBuilder("plain").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) + Stanza stanza = new StanzaBuilder("plain", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) .addText("aEflkejidkj==") .build(); @@ -54,7 +54,7 @@ public void testPlainNonExistingUser() throws XMLSemanticError { - Stanza stanza = new StanzaBuilder("plain").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) + Stanza stanza = new StanzaBuilder("plain", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) .addText(encode("dieter", "schluppkoweit")) .build(); @@ -64,7 +64,7 @@ public void testPlainNotExistingUser() throws XMLSemanticError { - Stanza stanza = new StanzaBuilder("plain").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) + Stanza stanza = new StanzaBuilder("plain", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) .addText(encode("dieter", "schluppkoweit")) .build(); @@ -76,7 +76,7 @@ String innerText = new String(Base64.encodeBase64("continuous".getBytes())); - Stanza stanza = new StanzaBuilder("plain").addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) + Stanza stanza = new StanzaBuilder("plain", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL) .addText(innerText).build(); Stanza response = startMechanism(stanza); Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AbortHandlerTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AbortHandlerTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AbortHandlerTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AbortHandlerTestCase.java Fri Dec 4 12:30:06 2009 @@ -70,8 +70,7 @@ StanzaBuilder stanzaBuilder = createAbort(); Stanza abortPlainStanza = stanzaBuilder.build(); - stanzaBuilder = new StanzaBuilder("auth"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + stanzaBuilder = new StanzaBuilder("auth", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); stanzaBuilder.addAttribute("mechanism", "PLAIN"); stanzaBuilder.addText(new String(Base64.encodeBase64("dummy\0user007\0pass007".getBytes()))); Stanza authPlainStanza = stanzaBuilder.build(); Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerPlainMechanismTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerPlainMechanismTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerPlainMechanismTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerPlainMechanismTestCase.java Fri Dec 4 12:30:06 2009 @@ -155,8 +155,7 @@ } private StanzaBuilder createAuthPlain() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("auth"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + StanzaBuilder stanzaBuilder = new StanzaBuilder("auth", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); stanzaBuilder.addAttribute("mechanism", "PLAIN"); return stanzaBuilder; } Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerUnavailableMechanismTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerUnavailableMechanismTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerUnavailableMechanismTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/sasl/handler/AuthHandlerUnavailableMechanismTestCase.java Fri Dec 4 12:30:06 2009 @@ -55,8 +55,7 @@ } public void testAuthPlainWrongCase() throws AuthorizationFailedException { - StanzaBuilder stanzaBuilder = new StanzaBuilder("auth"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + StanzaBuilder stanzaBuilder = new StanzaBuilder("auth", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); stanzaBuilder.addAttribute("mechanism", "plain"); // 'PLAIN' would be correct Stanza authPlainStanza = stanzaBuilder.build(); @@ -71,8 +70,7 @@ } public void testAuthPlainUnavailableMechanism() throws AuthorizationFailedException { - StanzaBuilder stanzaBuilder = new StanzaBuilder("auth"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); + StanzaBuilder stanzaBuilder = new StanzaBuilder("auth", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL); stanzaBuilder.addAttribute("mechanism", "EXTERNAL"); Stanza authPlainStanza = stanzaBuilder.build(); Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/starttls/handler/StartTLSHandlerTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/starttls/handler/StartTLSHandlerTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/starttls/handler/StartTLSHandlerTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/core/starttls/handler/StartTLSHandlerTestCase.java Fri Dec 4 12:30:06 2009 @@ -44,8 +44,7 @@ } public void testAppropriateSessionState() { - StanzaBuilder stanzaBuilder = new StanzaBuilder("starttls"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); + StanzaBuilder stanzaBuilder = new StanzaBuilder("starttls", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); Stanza starttlsStanza = stanzaBuilder.build(); TestSessionContext sessionContext = this.sessionContext; @@ -81,12 +80,10 @@ public void testNamespace() { sessionContext.setSessionState(SessionState.STARTED); - StanzaBuilder stanzaBuilder = new StanzaBuilder("starttls"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.HTTP_ETHERX_JABBER_ORG_STREAMS); + StanzaBuilder stanzaBuilder = new StanzaBuilder("starttls", NamespaceURIs.HTTP_ETHERX_JABBER_ORG_STREAMS); Stanza wrongNSStanza = stanzaBuilder.build(); - stanzaBuilder = new StanzaBuilder("starttls"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); + stanzaBuilder = new StanzaBuilder("starttls", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS); Stanza correctNSStanza = stanzaBuilder.build(); TestSessionContext sessionContext = this.sessionContext; Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/roster/handler/RosterIQHandlerTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/roster/handler/RosterIQHandlerTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/roster/handler/RosterIQHandlerTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/modules/roster/handler/RosterIQHandlerTestCase.java Fri Dec 4 12:30:06 2009 @@ -66,7 +66,7 @@ private StanzaBuilder createRosterGet() { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(new EntityImpl(client, boundResourceId), null, IQStanzaType.GET, "id1"); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute(NamespaceURIs.JABBER_IQ_ROSTER).endInnerElement(); + stanzaBuilder.startInnerElement("query", NamespaceURIs.JABBER_IQ_ROSTER).endInnerElement(); return stanzaBuilder; } Modified: mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/core/src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java Fri Dec 4 12:30:06 2009 @@ -197,7 +197,7 @@ StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); stanzaBuilder.addAttribute("from", new EntityImpl("charlotte", server.getDomain(), onlyBoundResource).getFullQualifiedName()); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); + stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder); @@ -220,7 +220,7 @@ StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); stanzaBuilder.addAttribute("from", new EntityImpl("charlotte", server.getDomain(), arbitraryUnboundResource).getFullQualifiedName()); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); + stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder); @@ -252,7 +252,7 @@ StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); stanzaBuilder.addAttribute("from", new EntityImpl("lea", server.getDomain(), null).getFullQualifiedName()); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); + stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder); Stanza recordedResponse = sessionContext.getNextRecordedResponse(); @@ -266,7 +266,7 @@ // bare id allowed, only one resource is bound stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); stanzaBuilder.addAttribute("from", new EntityImpl("lea", server.getDomain(), null).getFullQualifiedName()); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); + stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder); stanzaHandler.assertHandlerCalled(); sessionContext.reset(); @@ -274,7 +274,7 @@ // second resource is now invalid and cannot be used anymore in a full qualified entity stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); stanzaBuilder.addAttribute("from", new EntityImpl("lea", server.getDomain(), secondBoundResource).getFullQualifiedName()); - stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); + stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder); recordedResponse = sessionContext.getNextRecordedResponse(); assertUnknownSenderError(recordedResponse); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/SubscriberPayloadNotificationVisitor.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/SubscriberPayloadNotificationVisitor.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/SubscriberPayloadNotificationVisitor.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/SubscriberPayloadNotificationVisitor.java Fri Dec 4 12:30:06 2009 @@ -89,12 +89,11 @@ * @return the prepared Stanza object. */ private Stanza createMessageEventStanza(String nodeName, Entity to, String lang, XMLElement item) { - StanzaBuilder stanzaBuilder = new StanzaBuilder("message"); + StanzaBuilder stanzaBuilder = new StanzaBuilder("message", NamespaceURIs.XEP0060_PUBSUB_EVENT); stanzaBuilder.addAttribute("from", serverJID.getFullQualifiedName()); stanzaBuilder.addAttribute("to", to.getFullQualifiedName()); stanzaBuilder.addAttribute(NamespaceURIs.XML, "lang", lang); stanzaBuilder.startInnerElement("event"); - stanzaBuilder.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB_EVENT); stanzaBuilder.startInnerElement("items"); stanzaBuilder.addAttribute("node", nodeName); stanzaBuilder.addPreparedElement(item); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubPublishHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubPublishHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubPublishHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubPublishHandler.java Fri Dec 4 12:30:06 2009 @@ -90,8 +90,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB); XMLElement publish = stanza.getFirstInnerElement().getFirstInnerElement(); // pubsub/publish String nodeName = publish.getAttributeValue("node"); // MUST Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveAffiliationsHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveAffiliationsHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveAffiliationsHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveAffiliationsHandler.java Fri Dec 4 12:30:06 2009 @@ -77,8 +77,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB); List<AffiliationItem> subscriptions = collectAffiliations(root, sender); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveSubscriptionsHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveSubscriptionsHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveSubscriptionsHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubRetrieveSubscriptionsHandler.java Fri Dec 4 12:30:06 2009 @@ -79,8 +79,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB); String nodeName = extractNodeName(stanza); List<SubscriptionItem> subscriptions = collectSubscriptions(root, sender, nodeName); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubSubscribeHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubSubscribeHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubSubscribeHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubSubscribeHandler.java Fri Dec 4 12:30:06 2009 @@ -94,8 +94,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB); XMLElement sub = stanza.getFirstInnerElement().getFirstInnerElement(); // pubsub/subscribe String strSubJID = sub.getAttributeValue("jid"); // MUST Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubUnsubscribeHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubUnsubscribeHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubUnsubscribeHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/PubSubUnsubscribeHandler.java Fri Dec 4 12:30:06 2009 @@ -89,8 +89,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB); XMLElement unsub = stanza.getFirstInnerElement().getFirstInnerElement(); // pubsub/unsubscribe String strSubJID = unsub.getAttributeValue("jid"); // MUST Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/owner/PubSubOwnerManageAffiliationsHandler.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/owner/PubSubOwnerManageAffiliationsHandler.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/owner/PubSubOwnerManageAffiliationsHandler.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/owner/PubSubOwnerManageAffiliationsHandler.java Fri Dec 4 12:30:06 2009 @@ -89,8 +89,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB_OWNER); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB_OWNER); String nodeName = extractNodeName(stanza); LeafNode node = root.find(nodeName); @@ -130,8 +129,7 @@ String iqStanzaID = stanza.getAttributeValue("id"); StanzaBuilder sb = StanzaBuilder.createIQStanza(serverJID, sender, IQStanzaType.RESULT, iqStanzaID); - sb.startInnerElement("pubsub"); - sb.addNamespaceAttribute(NamespaceURIs.XEP0060_PUBSUB_OWNER); + sb.startInnerElement("pubsub", NamespaceURIs.XEP0060_PUBSUB_OWNER); String nodeName = extractNodeName(stanza); LeafNode node = root.find(nodeName); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoInfoTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoInfoTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoInfoTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoInfoTestCase.java Fri Dec 4 12:30:06 2009 @@ -163,8 +163,7 @@ public Stanza getStanza(Entity client, Entity pubsub, String id) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id); - stanzaBuilder.startInnerElement("query"); - stanzaBuilder.addNamespaceAttribute(getNamespace()); + stanzaBuilder.startInnerElement("query", getNamespace()); return stanzaBuilder.build(); } @@ -172,8 +171,7 @@ @Override public Stanza getStanza(Entity client, Entity pubsub, String id, String node) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id); - stanzaBuilder.startInnerElement("query"); - stanzaBuilder.addNamespaceAttribute(getNamespace()); + stanzaBuilder.startInnerElement("query", getNamespace()); stanzaBuilder.addAttribute("node", node); stanzaBuilder.endInnerElement(); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoItemsTestCase.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoItemsTestCase.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoItemsTestCase.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/disco/PubSubDiscoItemsTestCase.java Fri Dec 4 12:30:06 2009 @@ -201,8 +201,7 @@ public Stanza getStanza(Entity client, Entity pubsub, String id) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id); - stanzaBuilder.startInnerElement("query"); - stanzaBuilder.addNamespaceAttribute(getNamespace()); + stanzaBuilder.startInnerElement("query", getNamespace()); stanzaBuilder.endInnerElement(); @@ -212,8 +211,7 @@ @Override public Stanza getStanza(Entity client, Entity pubsub, String id, String node) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id); - stanzaBuilder.startInnerElement("query"); - stanzaBuilder.addNamespaceAttribute(getNamespace()); + stanzaBuilder.startInnerElement("query", getNamespace()); stanzaBuilder.addAttribute("node", node); stanzaBuilder.endInnerElement(); Modified: mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/AbstractStanzaGenerator.java URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/AbstractStanzaGenerator.java?rev=887171&r1=887170&r2=887171&view=diff ============================================================================== --- mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/AbstractStanzaGenerator.java (original) +++ mina/sandbox/vysper/trunk/server/extensions/xep0060-pubsub/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/handler/AbstractStanzaGenerator.java Fri Dec 4 12:30:06 2009 @@ -66,8 +66,7 @@ */ public Stanza getStanza(Entity client, Entity pubsub, String id, String node) { StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id); - stanzaBuilder.startInnerElement("pubsub"); - stanzaBuilder.addNamespaceAttribute(getNamespace()); + stanzaBuilder.startInnerElement("pubsub", getNamespace()); buildInnerElement(client, pubsub, stanzaBuilder, node);