<?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>Web Services</title><link>https://www.infopathdev.com:443/forums/48.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Web Service Null values passed back and forth ... Xpath, XML, WebServiceConnection</title><link>https://www.infopathdev.com:443/forums/thread/60015.aspx</link><pubDate>Wed, 06 Oct 2010 16:24:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60015</guid><dc:creator>brian.jank</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60015.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=60015</wfw:commentRss><description>&lt;p&gt;Because I tend to try anything except the obvious and correct solution. That worked fine, and I will be using it alot, thank you jimmy!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;m pretty new to infopath, sharepoint and C# but I have good knowledge of programming and C++ on an academic level. Theres alot of basic functional knowledge I&amp;#39;m missing, especially when it comes to using new class libraries and such. &lt;/p&gt;</description></item><item><title>Re: Web Service Null values passed back and forth ... Xpath, XML, WebServiceConnection</title><link>https://www.infopathdev.com:443/forums/thread/60011.aspx</link><pubDate>Wed, 06 Oct 2010 15:28:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60011</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60011.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=60011</wfw:commentRss><description>&lt;p&gt;Why not just use webservConn.Execute()&amp;nbsp; (no arguments), and use InfoPath&amp;#39;s built-in data source access methods?&lt;/p&gt;</description></item><item><title>Web Service Null values passed back and forth ... Xpath, XML, WebServiceConnection</title><link>https://www.infopathdev.com:443/forums/thread/59991.aspx</link><pubDate>Wed, 06 Oct 2010 12:43:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59991</guid><dc:creator>brian.jank</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=59991</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to se code to call and retieve data from web services, and I&amp;#39;m having the same problem with null values being passed. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;WebServiceConnection webservConn = (WebServiceConnection)DataConnections[&amp;quot;dataConnectionName&amp;quot;];&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;&amp;nbsp; XmlDocument inputDoc = new XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputDoc.LoadXml(&amp;quot;&amp;lt;EmployeeGetbyUserId xmlns=\&amp;quot;&lt;a href="http://infoweb.acoa-apeca.gc.ca/ws/hris/hr.asmx?WSDL\"&gt;&amp;lt;webserviceurl&amp;gt;&lt;/a&gt;&amp;gt;&amp;quot; + User.UserName.ToString() + &amp;quot;&amp;lt;/sUserId&amp;gt;&amp;lt;/EmployeeGetbyUserId&amp;gt;&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator inputNav = inputDoc.CreateNavigator();&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;&amp;nbsp; XmlDocument outputDoc = new XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator outputNav = outputDoc.CreateNavigator();&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;&amp;nbsp; XmlDocument errorDoc = new XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator errorNav = errorDoc.CreateNavigator();&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;&amp;nbsp; webservConn.Execute(inputNav, outputNav, errorNav);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not sure if this is supposed to automatically populate the data connection fields in the form but they are blank when accessed. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m using pretty much the same code to submit the retrieved data to another web service and the values are also received as null by the webservice.&lt;/p&gt;
&lt;p&gt;Is this an incorrect approach to using web services programmatically in infopath or am I misunderstanding the XML code i&amp;#39;m passing into the execution?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the programmatic approach because I want to poll windows for the username before I call the web service, but still on Load (the data connection wizard only allows a static value to be passed)&lt;/p&gt;</description></item></channel></rss>