private void ConfigureClient(CaseManagementClient client) { // Load the certificate from the Project Resources. // Note that this certificate has been generated from the default SOLA Development keystore.jks. Instructions on how to // generate the cert using the Java keytool can be found here. // http://stackoverflow.com/questions/5529541/developing-a-net-client-that-consumes-a-secure-metro-2-1-web-service // Note that it is also necessary to add DNS identity configuration to the app.config. The default DNS identity in this // certificate is xwssecurityserver. X509Certificate2 cert = new X509Certificate2(org.sola.services.boundary.wsclients.Properties.Resources.ServerCertificate); client.ClientCredentials.ServiceCertificate.DefaultCertificate = cert; client.ClientCredentials.UserName.UserName = uName; client.ClientCredentials.UserName.Password = pWord; }
public void Start() { CaseManagementClient client = new CaseManagementClient(); //userName, password, companyName companyId var authResponse = client.Authenticate("*****@*****.**", "Porsche986", "", 10200); if (authResponse != null) { var accessToken = authResponse.token; var caseData = client.GetMobileCaseInboxItems(accessToken, null, null, null, false, 0, 50); if (caseData != null) { Console.WriteLine($"Total number of cases found: {caseData.caseMobileInboxData.TotalNewMessageCount}"); } } }
public applicationTO SaveApplication(applicationTO application) { applicationTO result = null; using (CaseManagementClient client = new CaseManagementClient()) { ConfigureClient(client); try { client.Open(); result = client.SaveApplication(application); client.Close(); } catch (Exception ex) { client.Abort(); throw ex; } } return(result); }
public webservices.casemanagement.extra.partyTO SaveParty(webservices.casemanagement.extra.partyTO party) { partyTO result = null; using (CaseManagementClient client = new CaseManagementClient()) { ConfigureClient(client); try { client.Open(); result = client.SaveParty(party); client.Close(); } catch (Exception ex) { client.Abort(); throw ex; } } return(result); }
public bool CheckConnection() { bool result = false; using (CaseManagementClient client = new CaseManagementClient()) { ConfigureClient(client); try { client.Open(); result = client.CheckConnection(); client.Close(); } catch (Exception ex) { client.Abort(); throw ex; } } return(result); }
public applicationTO GetApplication(string id) { applicationTO result = null; using (CaseManagementClient client = new CaseManagementClient()) { ConfigureClient(client); try { client.Open(); result = client.GetApplication(id); client.Close(); } catch (Exception ex) { client.Abort(); throw; } } return(result); }