Dear luisxbmo:

 

Thanks for your comment , however, after I follow your opinion that I set the 8 para to false, I still get the exception.

 

Sorry that I didn’t give much info about my case, here it is:

 

The Error message that throw is

 

“QueryInterface for interface AxaptaCOMConnector.IAxapta2 failed.”

 

I am using Windows Server 2003,

 

And I won’t get this error if I am using WinXP and Windows 2000 Server

 

Therefore I suspect it is because Windows Server 2003, anyone have come across it and do you have any solution.

 

Regards

Joel

 


From: luisxbmo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 09, 2004 1:15 AM
To: [EMAIL PROTECTED]
Subject: [Axapta-Knowledge-Village] Re: Axapta 2.5 COM Connector Web Service Error

 


Hi Joel,

The 8th parameter to Axapta.Logon2 is a boolean value specifying
whether the user credentials are for a web user or not. If not then it
should look like this.

Axapta.Logon2("Admin","adminpwd","tx2","","","",",false,",");

Regards,

--
Luis Mourão
[EMAIL PROTECTED]

--- In [EMAIL PROTECTED], "Joel WU"
<[EMAIL PROTECTED]> wrote:
> Hi all:
>

>
> I have the problem when I try to test the Webservice using C# using the
> Axapta COM Connector
>
> I get a exception when I try to logon to Axpata.. However I won't
have such
> error when I write a Windows Application using C#
>
> Any one know what is happening to my code?
>

>
> Regards,
>
> Joel
>

>
> using System;
>
> using System.Collections;
>
> using System.ComponentModel;
>
> using System.Data;
>
> using System.Diagnostics;
>
> using System.Web;
>
> using System.Web.Services;
>
> using System.Data.SqlClient;
>
> namespace AxaptaConnector
>
> {
>
>      /// <summary>
>
>      /// Summary description for Service1.
>
>      /// </summary>
>
>      public class AxaptaService : System.Web.Services.WebService
>
>      {
>
>            public AxaptaService()
>
>            {
>
>                 //CODEGEN: This call is required by the ASP.NET Web
Services
> Designer
>
>                 InitializeComponent();         
>
>            }
>

>
>            #region Component Designer generated code
>
>           
>
>            //Required by the Web Services Designer
>
>            private IContainer components = null;
>
>                     
>
>            private void InitializeComponent()
>
>            {
>
>            }
>
>            protected override void Dispose( bool disposing )
>
>            {
>
>                 if(disposing && components != null)
>
>                 {
>
>                      components.Dispose();
>
>                 }
>
>                 base.Dispose(disposing);       
>
>            }
>
>           
>
>            #endregion
>

>
>            [WebMethod]
>
>            public string getCustCount()
>
>            {   
>
>                 int cnt;
>
>                 AxaptaCOMConnector.Axapta2 Axapta = new
> AxaptaCOMConnector.Axapta2Class();
>

>
>                 DataSet mydataset = new DataSet();
>
>                 try
>
>                 {
>

> Axapta.Logon2("Admin","adminpwd","tx2","","","",",",",");
>
>                 }
>
>                 catch(Exception Er)
>
>                 {
>
>                      return Er.Message;
> <------------------------------------------------- Exception Happen
>
>                 }
>

>
>                 AxaptaCOMConnector.IAxaptaRecord CustRecord;
>
>                 try
>
>                 {
>
>                      CustRecord = Axapta.CreateRecord("CustTable");
>
>                      cnt = 0;
>
>                      while (CustRecord.Found)
>
>                      {
>
>                            cnt++;
>
>                            CustRecord.Next();
>
>                      }
>
>                 }
>
>                 catch(Exception Err)
>
>                 {
>
>                      Axapta.Logoff();
>
>                      return Err.Message;
>
>                 }
>
>                 Axapta.Logoff();
>
>                 return "OK";
>
>            }
>
>      }
>
> }





Sharing the knowledge on Axapta.





Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to