Показать сообщение отдельно
Старый 12.04.2007, 14:07   #6  
Jox is offline
Jox
Developer
Аватар для Jox
 
112 / 24 (1) +++
Регистрация: 26.07.2005
Адрес: Питер
Благодарю за помощь.
Вот какой код на 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;
    }
}

Последний раз редактировалось Jox; 12.04.2007 в 15:03.