<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Web Method namespace altered</title><link>https://www.infopathdev.com:443/forums/thread/32552.aspx</link><pubDate>Thu, 25 Sep 2008 21:01:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32552</guid><dc:creator>asiandreads</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32552.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32552</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;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.&amp;nbsp;
The reason I had to write the Service in the 1st place is to get around
the windows authentication &amp;quot;double-hop&amp;quot; issue, since my Sharepoint
Server and SQL Server are on different boxes.&amp;nbsp; This is my web method,
PreSubmitCheckForEntries, header below:&lt;/p&gt;&lt;p&gt;public class TimecardService : System.Web.Services.WebService&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public TimecardService () {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Uncomment the following line if using designed components &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //InitializeComponent(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int PreSubmitCheckForEntries(XPathNavigator xNav) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do stuff.&lt;br /&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;} &lt;br /&gt;&lt;/p&gt;&lt;p&gt;
Anyhow, the problem I am having is that for some reason, my web method
is expecting the parameter type
&amp;#39;TimecardForm.TimecardService.XPathNavigator&amp;#39;, which doesn&amp;#39;t exist as
far as I can tell.&amp;nbsp; I get this error when try to compile my FormCode.cs:&lt;/p&gt;&lt;p&gt;&amp;nbsp;Error&amp;nbsp;&amp;nbsp;
&amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;The best overloaded method match for
&amp;#39;TimecardForm.TimecardService.TimecardService.PreSubmitCheckForEntries(TimecardForm.TimecardService.XPathNavigator)&amp;#39;
has some invalid arguments&amp;nbsp;&amp;nbsp; &amp;nbsp;C:\Working Folder\InfoPath
Forms\TimecardForm\FormCode.cs&amp;nbsp;&amp;nbsp; &amp;nbsp;133&amp;nbsp;&amp;nbsp; &amp;nbsp;34&amp;nbsp;&amp;nbsp; &amp;nbsp;TimecardForm&lt;/p&gt;&lt;p&gt;Error&amp;nbsp;&amp;nbsp;&amp;nbsp;
2&amp;nbsp;&amp;nbsp;&amp;nbsp; Argument &amp;#39;1&amp;#39;: cannot convert from
&amp;#39;System.Xml.XPath.XPathNavigator&amp;#39; to
&amp;#39;TimecardForm.TimecardService.XPathNavigator&amp;#39;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Working
Folder\InfoPath Forms\TimecardForm\FormCode.cs&amp;nbsp;&amp;nbsp;&amp;nbsp; 133&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;
TimecardForm&lt;/p&gt;&lt;p&gt;&amp;nbsp;Why on earth does my FormCode.cs file misread the namespace of the XPathNavigator class?&amp;nbsp; &lt;/p&gt;&lt;p&gt;I
am accessing my Web Service via a Web Reference added to my
FormCode.cs.&amp;nbsp; Also, why can&amp;#39;t I add the Web Service class to my
FormCode.cs solution through &amp;quot;Add Item?&amp;quot;&amp;nbsp; Apparently that template
isn&amp;#39;t installed on Visual Studio Tools For Applications (VSTA)?&lt;/p&gt;&lt;p&gt;Any help or insight is greatly appreciated.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;Rob</description></item></channel></rss>