Package org.apache.vysper.xmpp.stanza

Examples of org.apache.vysper.xmpp.stanza.IQStanzaType


        // from XEP-0054 3.1:
        // If no vCard exists, the server MUST return a stanza error (which SHOULD be <item-not-found/>)
        // or an IQ-result containing an empty <vCard/> element.
        if (vcardXml == null) {
            IQStanzaType iqStanzaType = returnEmptyVCardWhenNonExistent ? IQStanzaType.RESULT : IQStanzaType.ERROR;
            StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), iqStanzaType, stanza.getID());
            stanzaBuilder.startInnerElement("vCard", NamespaceURIs.VCARD_TEMP).endInnerElement();
            if (returnEmptyVCardWhenNonExistent) {
                // keep it like it is
            } else {
View Full Code Here


                    "iq-stanza requires 'id' attribute to be present",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
        }

        // rfc3920/9.2.3/2.
        IQStanzaType iqType = stanza.getIQType();
        if (iqType == null) {
            // missing or unknown type
            return ServerErrorResponses.getInstance().getStanzaError(StanzaErrorCondition.BAD_REQUEST, stanza,
                    StanzaErrorType.MODIFY,
                    "iq-stanza requires a valid 'type' attribute to be present",
View Full Code Here

                    StanzaErrorType.MODIFY, "iq-stanza requires 'id' attribute to be present",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
        }

        // rfc3920/9.2.3/2.
        IQStanzaType iqType = stanza.getIQType();
        if (iqType == null) {
            // missing or unknown type
            return ServerErrorResponses.getInstance().getStanzaError(StanzaErrorCondition.BAD_REQUEST, stanza,
                    StanzaErrorType.MODIFY, "iq-stanza requires a valid 'type' attribute to be present",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

        // from XEP-0054 3.1:
        // If no vCard exists, the server MUST return a stanza error (which SHOULD be <item-not-found/>)
        // or an IQ-result containing an empty <vCard/> element.
        if (vcardXml == null) {
            IQStanzaType iqStanzaType = returnEmptyVCardWhenNonExistent ? IQStanzaType.RESULT : IQStanzaType.ERROR;
            StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), iqStanzaType,
                    stanza.getID());
            stanzaBuilder.startInnerElement("vCard", NamespaceURIs.VCARD_TEMP).endInnerElement();
            if (returnEmptyVCardWhenNonExistent) {
                // keep it like it is
View Full Code Here

        // from XEP-0054 3.1:
        // If no vCard exists, the server MUST return a stanza error (which SHOULD be <item-not-found/>)
        // or an IQ-result containing an empty <vCard/> element.
        if (vcardXml == null) {
            IQStanzaType iqStanzaType = returnEmptyVCardWhenNonExistent ? IQStanzaType.RESULT : IQStanzaType.ERROR;
            StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), iqStanzaType,
                    stanza.getID());
            stanzaBuilder.startInnerElement("vCard", NamespaceURIs.VCARD_TEMP).endInnerElement();
            if (returnEmptyVCardWhenNonExistent) {
                // keep it like it is
View Full Code Here

                    StanzaErrorType.MODIFY, "iq-stanza requires 'id' attribute to be present",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
        }

        // rfc3920/9.2.3/2.
        IQStanzaType iqType = stanza.getIQType();
        if (iqType == null) {
            // missing or unknown type
            return ServerErrorResponses.getStanzaError(StanzaErrorCondition.BAD_REQUEST, stanza,
                    StanzaErrorType.MODIFY, "iq-stanza requires a valid 'type' attribute to be present",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.stanza.IQStanzaType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.