Благодарю за помощь.
Вот какой код на C# получился в результате (привожу полностью)
X++:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using AxaptaCOMConnector;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class ScanBarcodeDemo : System.Web.Services.WebService
{
public ScanBarcodeDemo () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public int Authorize(string _userId, string _password) {
Axapta ax = new Axapta();
object ret;
ax.Logon("adi", "", "", "");
AxaptaParameterListClass parmList = new AxaptaParameterListClass();
parmList.Size = 2;
parmList.set_Element(1, _userId);
parmList.set_Element(2, _password);
ret = ax.CallStaticClassMethodEx("ScanBarcodeDemo", "authorize", parmList);
ax.Logoff();
try
{
ax.Stop();
}
catch (Exception exc)
{
}
return (int)ret;
}
}