<?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: Can I submit a field and the entire form to a ws?</title><link>https://www.infopathdev.com:443/forums/thread/17893.aspx</link><pubDate>Mon, 07 Aug 2006 08:10:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17893</guid><dc:creator>larniel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17893.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17893</wfw:commentRss><description>Thanks for your reply.&lt;br /&gt;I read this post, but I don't think that the replies to that topic give a pratical solution, at least a solution to my question.&lt;br /&gt;&lt;br /&gt;I customized a button and wrote the following JS codes:&lt;br /&gt;&lt;pre&gt;function CTRL4_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	&lt;br /&gt;	//Get a reference to the Web Service data connection&lt;br /&gt;	var dataObject;&lt;br /&gt;	dataObject = XDocument.DataObjects.Item("wsConn");&lt;br /&gt;	//Set the SelectionNamespaces property so you can navigate the web service XML()&lt;br /&gt;	dataObject.DOM.setProperty("SelectionNamespaces", "xmlns:dfs=\"http:/schemas.microsoft.com/office/infopath/2003/dataFormSolution\"" + "xmlns:tns=\"http:/tempuri.org/\"");&lt;br /&gt;&lt;br /&gt;	//Get a reference to the parameter in the web service&lt;br /&gt;	var xml;&lt;br /&gt;	xml = dataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:wsConn/tns:INPUTDATA");&lt;br /&gt;	xml.text = XDocument.Dom.xml;&lt;br /&gt;	&lt;br /&gt;	var num;&lt;br /&gt;	num = XDocument.DOM.selectSingleNode("/FAQ/num");&lt;br /&gt;	var id;&lt;br /&gt;	id = dataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:wsConn/tns:NUM");&lt;br /&gt;	id.text = num.text;&lt;br /&gt;	&lt;br /&gt;	dataObject.QueryAdapter.Query(); &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, &lt;b&gt;wsConn&lt;/b&gt; is a websevice connection defined in &lt;b&gt;Data Connections&lt;/b&gt;. Is it right?&lt;br /&gt;If yes, why that when I click this button, error occurs with the message "&lt;i&gt;An item with the following index does not exist in the collection: wsConn&lt;br /&gt;File:script.js&lt;br /&gt;Line:27&lt;/i&gt;"?&lt;br /&gt;&lt;br /&gt;Many thanks!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by K.Ramana Reddy&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;Check out this link, you can get some information.&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/forums/topic.asp?TOPIC_ID=2173&gt;http://infopathdev.com/forums/topic.asp?TOPIC_ID=2173&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope this will help for you,&lt;br /&gt;Thanks.&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: Can I submit a field and the entire form to a ws?</title><link>https://www.infopathdev.com:443/forums/thread/17892.aspx</link><pubDate>Sat, 05 Aug 2006 08:28:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17892</guid><dc:creator>K.Ramana Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17892.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17892</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Check out this link, you can get some information.&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/forums/topic.asp?TOPIC_ID=2173&gt;http://infopathdev.com/forums/topic.asp?TOPIC_ID=2173&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope this will help for you,&lt;br /&gt;Thanks.</description></item><item><title>Can I submit a field and the entire form to a ws?</title><link>https://www.infopathdev.com:443/forums/thread/17550.aspx</link><pubDate>Fri, 04 Aug 2006 14:33:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17550</guid><dc:creator>larniel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17550.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=17550</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;I am a newbie in InfoPath and JS. After read through the entire forum, I still don't know how to solve the problem I encountered.&lt;br /&gt;Please kindly help me on it.&lt;br /&gt;&lt;br /&gt;I need to submit an entire form to a webservice.&lt;br /&gt;However, a field of the form must be sent to the webservice at the same time. Namele, the webservice has to get the content of a field of the entire form submitted.&lt;br /&gt;&lt;br /&gt;Probably there are 2 solutions:&lt;br /&gt;1. Just submit the entire form, and the WS parse the XML string to get the field information. But take into consideration the performance, I'd prefer the second solution.&lt;br /&gt;2. Customize a button to submit the entire form together with the field to the WS.&lt;br /&gt;   Is it possible to manage it by some JS codes? If yes, how? &lt;br /&gt;&lt;br /&gt;Many thanks!</description></item></channel></rss>