DI SERVER. COMO CONECTARSE (LOGIN) A SAP BUSINESS ONE UTILIZANDO DI SERVER
public LoginResponse SAPConnectCompany()
{
try
{
string DatabaseType = "";
string soap_cmd = "";
string response = "";
string DatabasePassword = "my password";
string CompanyPassword = "my password";
if (this.settings.ServerType == "MSSQL2014") { DatabaseType = "dst_MSSQL2014"; }
if (this.settings.ServerType == "MSSQL2016") { DatabaseType = "dst_MSSQL2016"; }
if (this.settings.ServerType == "MSSQL2017") { DatabaseType = "dst_MSSQL2017"; }
if (this.settings.ServerType == "HANADB") { DatabaseType = "dst_HANADB"; }
soap_cmd = @"<?xml version=""1.0"" encoding=""UTF-16""?>";
soap_cmd += @"<env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">";
soap_cmd += @"<env:Body><dis:Login xmlns:dis=""http://www.sap.com/SBO/DIS"">";
soap_cmd += "<DatabaseServer>" + this.settings.Server + "</DatabaseServer>";
soap_cmd += "<DatabaseName>" + this.settings.Company + "</DatabaseName>";
soap_cmd += "<DatabaseType>" + DatabaseType + "</DatabaseType>";
soap_cmd += "<DatabaseUsername>" + this.settings.DbUserName + "</DatabaseUsername>";
soap_cmd += "<DatabasePassword>" + DatabasePassword + "</DatabasePassword>";
soap_cmd += "<CompanyUsername>" + this.settings.UserName + "</CompanyUsername>";
soap_cmd += "<CompanyPassword>" + CompanyPassword + "</CompanyPassword>";
soap_cmd += "<Language>ln_Spanish_La</Language>";
//soap_cmd += "<LicenseServer>" + this.settings.Server + "</LicenseServer>"; // opcional
soap_cmd += "</dis:Login></env:Body></env:Envelope>";
response = NodeDIS.Interact(soap_cmd);
LoginResponse login = this.xml.LoginResponse(response);
return login;
}
catch (Exception ex)
{
return new LoginResponse { Success = false, CodeErr = 400, SessionID = null, Message = ex.Message };
}
}
Referencia: SAP Business One SDK – Help Center
https://help.sap.com/viewer/product/SAP_BUSINESS_ONE/9.3/es-ES
.
CONECTAR (LOGIN) A SAPB1 USANDO DI SERVER
Full Stack Web Developer && SDK SAPB1 Developer.
Melómano, Gamer (Xbox), Comprador compulsivo de Amazon y Posiblemente con TDAH.