protected ActionEvent doRequestFailure(SipcResponse response) throws FetionException {
if(response.getBody()!=null){
Element root = XMLHelper.build(response.getBody().toSendString());
Element reason = root.getChild("reason");
if(reason!=null){
return new RequestFailureEvent(FailureType.REQEUST_FAIL,
reason.getAttributeValue("text"),
reason.getAttributeValue("refer-url"));
}else{
return new RequestFailureEvent(FailureType.REQEUST_FAIL, null, null);
}
}else{
return new RequestFailureEvent(FailureType.REQEUST_FAIL, null, null);
}
}