@SpecCompliant(spec="rfc3920", section="9.2.3", status= FINISHED, coverage = PARTIAL, comment="covers points 1, 2, 5 and 6"),
@SpecCompliant(spec="rfc3920bis-09", section="9.2.3", status= FINISHED, coverage = PARTIAL, comment="covers points 1, 2, 5 and 6")
})
@Override
protected Stanza executeCore(XMPPCoreStanza coreStanza, ServerRuntimeContext serverRuntimeContext, boolean isOutboundStanza, SessionContext sessionContext) {
IQStanza stanza = (IQStanza)coreStanza;
// rfc3920/9.2.3/1.
String id = stanza.getID();
if (id == null) {
return ServerErrorResponses.getInstance().getStanzaError(StanzaErrorCondition.BAD_REQUEST, stanza,
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",