public void ConfigViaFile() { //create service stub SearchBySsinClient client = new SearchBySsinClient("Ssin"); //Call with prepared request SearchBySSINReply response = client.Search(request); //Verify result Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code); Assert.AreEqual(request.Inscription.SSIN, response.Person.SSIN); }
public void ConfigViaCode() { //create service stub SearchBySsinClient client = new SearchBySsinClient(new StsBinding(), new EndpointAddress(new Uri("https://services-acpt.ehealth.fgov.be/consultRN/identifyPerson/v1"))); client.Endpoint.Behaviors.Remove <ClientCredentials>(); client.Endpoint.Behaviors.Add(new OptClientCredentials()); client.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByThumbprint, "9c4227f1b9c7a52823829837f1a2e80690da8010"); //Call with prepared request SearchBySSINReply response = client.Search(request); //Verify result Assert.AreEqual(response.Status.Message[0].Value, "100", response.Status.Code); Assert.AreEqual(request.Inscription.SSIN, response.Person.SSIN); }