Ejemplo n.º 1
0
 internal void Handle(GetSubscriberInfo input) {
    Log.Trace("Request subscriber info from Amdocs");
    if (TibcoBroker.AmdocsServices != null) {
       var req = new A.GetContactRelatedInfoRequest() {
          contactID = (string)input.SubscriberId.LocalId
       };
       var t = TibcoBroker.GetTenantByCardId<A.MultiTenant>(req.contactID);
       if (t != null) {
          AsyncCallback c = r => {
             try {
                var res = TibcoBroker.AmdocsServices.EndgetContactRelatedInfoOperation(r);
                if (res.getHeader.getStatus == "0") {
                   Reply(_getCustomer(res));
                } else if (res.getHeader.getStatus == "1") {
                   //TK: consider status respose.
                   Log.Warn("Unable to retrive customer info due to " + res.getHeader.getStatusReason);
                   Reply(null);
                }
             } catch (Exception e) {
                Log.Exception(e, "Unable to retrieve contact info from Amdocs");
                Throw(GeneralFailureCode.ServiceUnavailable);
             }
          };
          TibcoBroker.AmdocsServices.BegingetContactRelatedInfoOperation(t, "", req, c, null);
       }
    }
 }
Ejemplo n.º 2
0
 public void RequestDriverInfo(BplIdentity driverId, bool isReplyRequired) {
    var info = new GetSubscriberInfo { SubscriberId = driverId };
    var server = (OscarServer)(OscarServer.Current);
    _isReplyRequired = isReplyRequired;
    Forward(info, _onSuccess, _onFailure);
 }