/// <summary> /// Searches the own address. /// </summary> /// <returns>The list of PersonDataType Entries</returns> public List<PersonDataType> SearchOwnAddress() { List<PersonDataType> addrBook = new List<PersonDataType>(); LastRC = ZustellServiceRC.OK; var searchAddress = new SearchAddressType() { addToAddressbook = false, addToAddressbookSpecified = false, Edid = _certService.EdID, }; List<IDType> idList= new List<IDType>(); idList.Add(new IDType() { Type = IDTypeEnum.edID.ToString(), Value = _certService.EdID }); List<AbstractAddressType> addr = new List<AbstractAddressType>(); var pers = new PersonDataType() { Item = new AbstractPersonType() }; pers.Items = addr.ToArray(); pers.Item.Items = idList.ToArray(); searchAddress.Entry = pers; Log.Debug("Request: {@SearchAddressType}", CallerInfo.Create(), searchAddress); var resp = SearchAddress(searchAddress); if (LastRC == ZustellServiceRC.OK) { addrBook = resp; Log.Debug("Response: {@PersonDataType}", CallerInfo.Create(), addrBook); } return addrBook; }
/// <summary> /// Searches for the an address entry. /// </summary> /// <param name="searchTarget">The search target.</param> /// <returns>The list of PersonDataType Entries</returns> public List<PersonDataType> SearchAddress(SearchAddressType searchTarget) { List<PersonDataType> addrBook = new List<PersonDataType>(); LastRC = ZustellServiceRC.OK; SearchAddressRequest requ = new SearchAddressRequest() { SearchAddress = searchTarget }; Log.Debug("Request: {@SearchAddressType}", CallerInfo.Create(), requ.SearchAddress); var resp = CallSearchAddress(requ); if (LastRC == ZustellServiceRC.OK) { addrBook = resp.AddressBook.ToList(); Log.Debug("Response: {@PersonDataType}", CallerInfo.Create(), addrBook); } return addrBook; }