<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: submitting data to a web service</title><link>https://www.infopathdev.com:443/forums/thread/45077.aspx</link><pubDate>Tue, 28 Jul 2009 09:30:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45077</guid><dc:creator>MashadaG</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45077.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=45077</wfw:commentRss><description>&lt;p&gt;I have figured what to do, just in case anyone else has a similar problem.&lt;/p&gt;
&lt;p&gt;Use the submit data as string option in the data connections bit. This will submit an XML string that can then be transformed into a dataset in the web service, use a signature as below e.g.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WebMethod()&amp;gt; _&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Public Function SaveRpt(ByVal cls As String)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ds1 As New DataSet&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim tr As TextReader = New StringReader(cls)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim xr As XmlReader = New XmlTextReader(tr)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ds1.ReadXml(xr)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rr As DataRow&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMsg = ds1.Tables.Count&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each rr In ds1.Tables(&amp;quot;tbl&amp;quot;).Rows&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; strMsg = strMsg &amp;amp; &amp;quot; *** &amp;quot; &amp;amp; rr.Item(&amp;quot;item1&amp;quot;).ToString&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/p&gt;
&lt;p&gt;Hope this helps someone as it has driven mne up the wall for a while :)&lt;/p&gt;</description></item><item><title>Re: submitting data to a web service</title><link>https://www.infopathdev.com:443/forums/thread/44774.aspx</link><pubDate>Wed, 22 Jul 2009 08:26:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44774</guid><dc:creator>MashadaG</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44774.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=44774</wfw:commentRss><description>&lt;p&gt;Patrick&lt;/p&gt;
&lt;p&gt;Thanks for your response. I am trying to achieve the most basic of things I believe but I have no clue as to how to proceed. Consider this a customer and orders example. The relationship is one to many respectively. This means that the orders bit will be in a repeating table on the form say. Now retrieving that info via a web service is quite straight-forward as I will create a web method that returns an XML document.&lt;/p&gt;
&lt;p&gt;What I am struggling with is the submit method. Say I create a web method called SaveRecords(), I am not sure what parameters to pass to it for me to&amp;nbsp; then access the data that is returned from the InfoPath form. What I want to do is to access the data returned and do some calculations e.g. add VAT then submit this to a stored procedure. I believe the web method should be something like SaveRecords (ByVal Obj as ObjType), what I am not sure is what should ObjType be? Is it a class, enum??? That&amp;#39;s what I do not understand.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;That said I will try out your web service.&lt;/p&gt;
&lt;p&gt;Thanks for the help&lt;/p&gt;</description></item><item><title>Re: submitting data to a web service</title><link>https://www.infopathdev.com:443/forums/thread/44750.aspx</link><pubDate>Tue, 21 Jul 2009 19:37:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44750</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=44750</wfw:commentRss><description>&lt;p&gt;Hi MashadaG and welcome to our forum!&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand your post. It seems like you are doing something in a way that is way too complicated, but it&amp;#39;s also possible that I am just confused because I don&amp;#39;t understand your scenario very well. &lt;/p&gt;
&lt;p&gt;What I will recommend is to install our free Web Service trial. I guarantee you&amp;#39;ll be able to receive and submit data to SQL 2005 in very little time (certainly shouldn&amp;#39;t take more than an hour or two to install, configure and have working). That may be an option for you. We can give you an extended trial if you want it. Might be a good stopgap to get your stuff working and then you&amp;#39;ll have more time to debug your custom Web Service. I&amp;#39;m not trying to get you to buy anything but rather just trying to offer a free alternative to get unblocked so that you can show your solution working, etc. &lt;/p&gt;</description></item><item><title>submitting data to a web service</title><link>https://www.infopathdev.com:443/forums/thread/44736.aspx</link><pubDate>Tue, 21 Jul 2009 16:42:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44736</guid><dc:creator>MashadaG</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44736.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=44736</wfw:commentRss><description>&lt;p&gt;&lt;span style="COLOR:blue;"&gt;Hi&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;I am new to InfoPath 2007 and I am working on a live project that requires its use asap. I require to retrieve and submit data via a web service (SQL2005)&amp;nbsp;that I have written in VB.NET. The retrieval part works fine but m&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;y main&amp;nbsp;problem is with the submit part. What I am confused is what the signature for the submit method should be like.&amp;nbsp;After I receive the data, I need to do some internal biz process calculations before I persist it in the database&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;This is how I am retrieving the data. That works well and returns an xml document in place of a dataset as that is not supported.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;WebMethod()&amp;gt; _&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Public&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;span style="COLOR:blue;"&gt;Function&lt;/span&gt; GetAllRecords(&lt;span style="COLOR:blue;"&gt;ByVal&lt;/span&gt; acad_period &lt;span style="COLOR:blue;"&gt;As&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;String&lt;/span&gt;, &lt;span style="COLOR:blue;"&gt;ByVal&lt;/span&gt; aos_code &lt;span style="COLOR:blue;"&gt;As&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;String&lt;/span&gt;, &lt;span style="COLOR:blue;"&gt;ByVal&lt;/span&gt; aos_period &lt;span style="COLOR:blue;"&gt;As&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;String&lt;/span&gt;) &lt;span style="COLOR:blue;"&gt;As&lt;/span&gt; System.Xml.XmlDocument&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;This is how I am retrieving the data (this is the difficult part that I cannot understand). What signature do I use for the web service that receives the submitted data. For instance how do I get the values in the controls as if these are submitted back, they must exist in some type of object. That is what I do not understand.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;WebMethod()&amp;gt; _&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue;"&gt;Public&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;Function&lt;/span&gt; SaveRec() &lt;span style="COLOR:blue;"&gt;As&lt;/span&gt; &lt;span style="COLOR:blue;"&gt;String&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;I would appreciate any help or pointing in the right direction, this has really been nagging me all week :(&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="COLOR:blue;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR:blue;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>