if (msgBoxEpr.getAddress().contains("clientid")) {
formattedEventSink = msgBoxEventSink;
} else {
if (msgBoxEpr.getAllReferenceParameters() == null)
throw new MsgBrokerClientException("Invalid Message Box EPR, no reference parameters found");
String msgBoxId = msgBoxEpr.getAllReferenceParameters().get(MsgBoxQNameConstants.MSG_BOXID_QNAME).getText();
if (msgBoxId == null)
throw new MsgBrokerClientException(
"Invalid Message Box EPR, reference parameter MsgBoxAddress is missing");
String format = msgBoxEventSink.endsWith("/") ? "%sclientid/%s" : "%s/clientid/%s";
formattedEventSink = String.format(format, msgBoxEventSink, msgBoxId);
}
if (this.msgBoxUser == null) {
this.msgBoxUser = new MsgBoxClient();
}
String resp = null;
try {
resp = msgBoxUser.deleteMsgBox(msgBoxEpr, timeout);
} catch (RemoteException e) {
throw new MsgBrokerClientException("unable to delete the msg box", e);
}
return resp;
}