Hi,
From FormCode.cs of my browser-enabled form, I am trying to call a web method I wrote which calls a SQL 2005 stored procedure. The reason I had to write the Service in the 1st place is to get around the windows authentication "double-hop" issue, since my Sharepoint Server and SQL Server are on different boxes. This is my web method, PreSubmitCheckForEntries, header below:
public class TimecardService : System.Web.Services.WebService
{
public TimecardService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public int PreSubmitCheckForEntries(XPathNavigator xNav)
{
// Do stuff.
}
}
Anyhow, the problem I am having is that for some reason, my web method is expecting the parameter type 'TimecardForm.TimecardService.XPathNavigator', which doesn't exist as far as I can tell. I get this error when try to compile my FormCode.cs:
Error 1 The best overloaded method match for 'TimecardForm.TimecardService.TimecardService.PreSubmitCheckForEntries(TimecardForm.TimecardService.XPathNavigator)' has some invalid arguments C:\Working Folder\InfoPath Forms\TimecardForm\FormCode.cs 133 34 TimecardForm
Error 2 Argument '1': cannot convert from 'System.Xml.XPath.XPathNavigator' to 'TimecardForm.TimecardService.XPathNavigator' C:\Working Folder\InfoPath Forms\TimecardForm\FormCode.cs 133 70 TimecardForm
Why on earth does my FormCode.cs file misread the namespace of the XPathNavigator class?
I am accessing my Web Service via a Web Reference added to my FormCode.cs. Also, why can't I add the Web Service class to my FormCode.cs solution through "Add Item?" Apparently that template isn't installed on Visual Studio Tools For Applications (VSTA)?
Any help or insight is greatly appreciated.
Thanks,
Rob