<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>InfoPath is throwing exception with Web Service</title><link>https://www.infopathdev.com:443/forums/thread/23291.aspx</link><pubDate>Wed, 26 Sep 2007 18:27:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23291</guid><dc:creator>cathy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23291.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23291</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;I am trying to submit data to the sharepoint server through a web service. I have deployed web service to the sharepoint server machine.Its path in that &lt;br /&gt;machine is as follows:&lt;br /&gt;&lt;a class="WNAnc" href="http://server:7080/Service.asmx" target="winout"&gt;http://server:7080/Service.asmx&lt;/a&gt;. It is working well in that machine.&lt;br /&gt;I have created a data connection with the Infopath form to submit the data to the above web service. Now, I am executing this web service in the &lt;br /&gt;submit_button click event using the code below.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;DataConnection submit=this.DataConnections[&amp;quot;Web Service Submit&amp;quot;];&lt;br /&gt;submit.Execute();&lt;br /&gt;&lt;br /&gt;But, it is giving me the exception at run time, when I click on submit button, it is giving me the following error at the second line of code.&lt;br /&gt;&lt;br /&gt;System.Net.WebException was unhandled by user code&lt;br /&gt;&amp;nbsp; Message=&amp;quot;InfoPath cannot submit the form.\nAn error occurred while the &lt;br /&gt;form was being submitted.&amp;quot;&lt;br /&gt;&amp;nbsp; Source=&amp;quot;Microsoft.Office.InfoPath.Client.Internal.Host&amp;quot;&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; at &lt;br /&gt;Microsoft.Office.InfoPath.Internal.MomExceptionHelper.ExecuteDataConnectionAction(OMCall d)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; at &lt;br /&gt;Microsoft.Office.InfoPath.Internal.WebServiceConnectionHost.Execute()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; at &lt;br /&gt;Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent &lt;br /&gt;pEvent)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; at &lt;br /&gt;Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent)&lt;br /&gt;&lt;br /&gt;Can any body tell me&amp;nbsp; what would be the error?&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;</description></item></channel></rss>