Examples of IQStanzaType


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

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

                    "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

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

                    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

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
View Full Code Here

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
View Full Code Here

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

                    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
Copyright © 2018 www.massapi.com. 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.