// Send the subscription responce
if (log.isDebugEnabled()) {
log.debug("Sending subscription response for SynapseSubscription ID : " +
subscription.getId());
}
SOAPEnvelope soapEnvelope =
messageBuilder.genSubscriptionResponse(subscription);
dispatchResponse(soapEnvelope, EventingConstants.WSE_SUbSCRIBE_RESPONSE,
mc, false);
} else {
// Send the Fault responce
if (log.isDebugEnabled()) {
log.debug("SynapseSubscription Failed, sending fault response");
}
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
EventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
"Unable to subscribe ", "");
dispatchResponse(soapEnvelope, EventingConstants.WSA_FAULT, mc,
true);
}
} else {
// Send the Fault responce
if (log.isDebugEnabled()) {
log.debug("SynapseSubscription Failed, sending fault response");
}
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
SubscriptionMessageBuilder.getErrorCode(),
SubscriptionMessageBuilder.getErrorSubCode(),
SubscriptionMessageBuilder.getErrorReason(), "");
dispatchResponse(soapEnvelope, EventingConstants.WSA_FAULT, mc,
true);