<?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: Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48991.aspx</link><pubDate>Thu, 12 Nov 2009 16:12:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48991</guid><dc:creator>witzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48991</wfw:commentRss><description>&lt;p&gt;Jimmy -&lt;/p&gt;
&lt;p&gt;You are a genius - thanks so much.&amp;nbsp; I hope to get better and better at programming this stuff and hopefully some day I can help somebody out.&lt;/p&gt;</description></item><item><title>Re: Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48988.aspx</link><pubDate>Thu, 12 Nov 2009 15:56:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48988</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48988</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You can attach files to messages in this forum by clicking the Options tag when creating a message.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Please try this code:&lt;/p&gt;&lt;blockquote&gt;&amp;nbsp;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xp = xnMyForm.Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetRequesterResponse/tns:GetRequesterResult/tns:string&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;while&lt;/font&gt;&lt;/font&gt; (xp.MoveNext())&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a[0] = xp.Current.Value;&lt;br /&gt;}&lt;/p&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;p&gt;&amp;nbsp;Of course, this will just overwrite a[0] repeatedly, so you&amp;#39;ll need to devise a way of storing the retrieved data in a more logical manner. &lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48987.aspx</link><pubDate>Thu, 12 Nov 2009 15:16:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48987</guid><dc:creator>witzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48987.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48987</wfw:commentRss><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Qazi - that doesn&amp;#39;t work as it only goes through the while loop for 1 iteration.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Jimmy - wasn&amp;#39;t able to paste the screenshot for some reason.&amp;nbsp; I&amp;#39;m getting blocked from pasting into this message, but perhaps I can explain datasource better.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;I am returning a string array.&amp;nbsp; In the datasource, it is showing GetRequesterResult as a group and &amp;#39;string&amp;#39; as the repeating.&amp;nbsp; When I hover over &amp;#39;string&amp;#39; in the datasource it shows: string(Field) Repeating Data Type:(string).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;I hope this makes sense and really wish I could paste screenshot and as always thanks for the help.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48962.aspx</link><pubDate>Thu, 12 Nov 2009 06:37:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48962</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48962.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48962</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Why can&amp;#39;t you post a screenshot of your data source?&amp;nbsp; I don&amp;#39;t really understand which node is the repeating one from the way you described it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The correct approach here is to use xp.Current and relative XPaths, not to concatenate an index value into an absolute path.&amp;nbsp; If you could post a screenshot of your data source or describe whether tns:GetRequesterResult or tns:string is the repeating node, I can be of more help.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48960.aspx</link><pubDate>Thu, 12 Nov 2009 06:28:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48960</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48960.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48960</wfw:commentRss><description>&lt;p&gt;&lt;font color="#0000ff"&gt;check if this works&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;int i=0;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff"&gt;while&lt;/font&gt;&lt;font size="2"&gt; (xp.MoveNext())&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;a[i] = xnMyForm.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetRequesterResponse/tns:GetRequesterResult[&amp;quot;+i+&amp;quot;]/tns:string&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,NamespaceManager).Value;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;i++;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Secondary Data Source - Retrieving a string array from a web service</title><link>https://www.infopathdev.com:443/forums/thread/48942.aspx</link><pubDate>Wed, 11 Nov 2009 23:43:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48942</guid><dc:creator>witzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48942.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48942</wfw:commentRss><description>&lt;p&gt;This is much nastier than I thought it would be.&amp;nbsp; After&amp;nbsp;passing a paramer and calling the execute method (no problem), I am having a bunch of problems retrieving the string array.&lt;/p&gt;
&lt;p&gt;Here is the sec. data source (can&amp;#39;t paste it) - anyway it ends like this: &lt;/p&gt;
&lt;p&gt;datafields - tns:GetRequesterResponse - GetRequesterResult - string&lt;/p&gt;
&lt;p&gt;Retrieving&amp;nbsp;that string is giving me fits:&lt;/p&gt;
&lt;p&gt;Here is the code I use and it at least gets me the first element in the array that is returning 3, but how do I get the other 2 or should I just return a dataset from the web service??&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnMyForm = ds.CreateNavigator();&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xp = xnMyForm.Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetRequesterResponse/tns:GetRequesterResult&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;while&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (xp.MoveNext())&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;a[0] = xnMyForm.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetRequesterResponse/tns:GetRequesterResult/tns:string&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,NamespaceManager).Value;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;Thanks a lot for the help.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>