Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            WSCompanies.FusionCompanies FC = new WSCompanies.FusionCompanies();
            WSCompanies.GetFusionCompaniesReqMsgType Requests = new WSCompanies.GetFusionCompaniesReqMsgType();
            WSCompanies.GetFusionCompaniesRspMsgType Response = new WSCompanies.GetFusionCompaniesRspMsgType();
            System.Net.ICredentials credential = new System.Net.NetworkCredential("*****@*****.**", "gvKrTTPvEz5k7JHB");

            FC.Credentials     = credential;
            FC.Url             = "https://oidevoics-eivjinterop.integration.ocp.oraclecloud.com/ic/ws/integration/v1/flows/soap/FUSIONCOMPANIES/1.0/";
            FC.SoapVersion     = System.Web.Services.Protocols.SoapProtocolVersion.Default;
            FC.RequestEncoding = System.Text.Encoding.UTF8;

            //ServicePointManager.SecurityProtocol = Type(3072, SecurityProtocolType);

            //ServicePointManager.ServerCertificateValidationCallback = New Security.RemoteCertificateValidationCallback(AddressOf AcceptAllCertifications)

            Response = FC.GetFusionCompanies(Requests);
        }
        public DataTable getCompanies()
        {
            WSCompanies.FusionCompanies FC = new WSCompanies.FusionCompanies();
            WSCompanies.GetFusionCompaniesReqMsgType Requests = new WSCompanies.GetFusionCompaniesReqMsgType();
            WSCompanies.GetFusionCompaniesRspMsgType Response = new WSCompanies.GetFusionCompaniesRspMsgType();
            System.Net.ICredentials credential = new System.Net.NetworkCredential("*****@*****.**", "gvKrTTPvEz5k7JHB");

            FC.Credentials     = credential;
            FC.Url             = "https://oidevoics-eivjinterop.integration.ocp.oraclecloud.com/ic/ws/integration/v1/flows/soap/FUSIONCOMPANIES/1.0/";
            FC.SoapVersion     = System.Web.Services.Protocols.SoapProtocolVersion.Default;
            FC.RequestEncoding = System.Text.Encoding.UTF8;

            Response = FC.GetFusionCompanies(Requests);

            DataTable DT;

            DT = new DataTable();
            DataRow row;

            DT.Columns.Add("BusinessUnitId", typeof(String));
            DT.Columns.Add("BusinessUnitName", typeof(String));
            DT.Columns.Add("OrgID", typeof(String));
            DT.Columns.Add("LegalEntityIdentifier", typeof(String));

            foreach (WSCompanies.CompanyType cmp in Response.Companies)
            {
                row = DT.NewRow();
                row["BusinessUnitId"]        = cmp.BusinessUnitId;
                row["BusinessUnitName"]      = cmp.BusinessUnitName;
                row["OrgID"]                 = cmp.LegalEntityIdentifier;
                row["LegalEntityIdentifier"] = cmp.OrgID;
                DT.Rows.Add(row);
            }

            return(DT);
        }