<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problem using UserProfileService!</title><link>https://www.infopathdev.com:443/forums/thread/20739.aspx</link><pubDate>Thu, 14 Jun 2007 09:07:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20739</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20739.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=20739</wfw:commentRss><description>&lt;p&gt;Hi liorlankril,&lt;/p&gt;&lt;p&gt;The problem is that you are using the s0 namespace, but you did not define it in your setProperty() call.&amp;nbsp; Take a look at this blog post for more information: &lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Setup-Namespaces-for-a-Secondary-Data-Source.aspx"&gt;http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Setup-Namespaces-for-a-Secondary-Data-Source.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Problem using UserProfileService!</title><link>https://www.infopathdev.com:443/forums/thread/20498.aspx</link><pubDate>Thu, 07 Jun 2007 10:07:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20498</guid><dc:creator>liorlankril</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20498.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=20498</wfw:commentRss><description>&lt;p&gt;My InfoPath form contain a Data Connection to a SharePoint web service:&lt;/p&gt;&lt;p&gt;&lt;a href="http://&amp;lt;myserver&amp;gt;/_vti_bin/UserProfileService.asmx?WSDL"&gt;http://&amp;lt;MyServer&amp;gt;/_vti_bin/UserProfileService.asmx?WSDL&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In my code (in the OnLoad event) I try to operate this Data Connection by this code:&lt;/p&gt;&lt;p&gt;function XDocument::OnLoad(eventObj) &lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;var objNetwork = new ActiveXObject(&amp;quot;WScript.network&amp;quot;); &lt;/p&gt;&lt;p&gt;var currentLogin=objNetwork.UserDomain+&amp;quot;\\&amp;quot; +objNetwork.UserName ; &lt;/p&gt;&lt;p&gt;if(XDocument.IsNew) { &lt;/p&gt;&lt;p&gt;var dataObj=XDocument.DataObjects(&amp;quot;GetUserProfileByName&amp;quot;); &lt;/p&gt;&lt;p&gt;var dataDom=dataObj.DOM; &lt;/p&gt;&lt;p&gt;dataDom.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:dfs=&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&lt;/a&gt; xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; &amp;#39; ); &lt;/p&gt;&lt;p&gt;dataDom.selectSingleNode (&amp;quot;/dfs:myFields/dfs:queryFields/&lt;strong&gt;s0:GetUserProfileByName/s0:AccountName&lt;/strong&gt;&amp;quot;).text=currentLogin ; &lt;/p&gt;&lt;p&gt;dataObj.Query(); &lt;/p&gt;&lt;p&gt;}&amp;nbsp;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;I try to put &amp;quot;currentLogin&amp;quot; as parameter of the web service, But I get error that:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Reference to undeclared namespace prefix:&amp;#39;s0&amp;#39; .&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;When I watch the field&amp;#39;s tree of this Data Connection (named &amp;quot;GetUserProfileByName&amp;quot;) in the Data Source view I have:&lt;/p&gt;&lt;p&gt;MyFields -&amp;gt; queryFields -&amp;gt; s0:GetUserProfileByName -&amp;gt; AccountName.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What is the problem in my code???&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>