<?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: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42539.aspx</link><pubDate>Fri, 05 Jun 2009 17:03:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42539</guid><dc:creator>IPSeeker</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42539.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42539</wfw:commentRss><description>&lt;p&gt;Why, certainly!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Step 1.&amp;nbsp; Create the Web Service.&amp;nbsp; As mentioned you can use MS Visual Web Developer 2008 Express.&amp;nbsp; Here is a good link to get started on that, &lt;a href="http://msdn.microsoft.com/en-us/library/8wbhsy70(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/8wbhsy70(VS.80).aspx&lt;/a&gt;.&amp;nbsp; I found this &amp;#39;How To&amp;#39; to be very simple to follow and it works!&amp;nbsp; If you want to do it the &amp;quot;SharePoint Way&amp;quot;, you can follow this link &lt;a href="http://it.toolbox.com/blogs/sharepoint-blog/creating-a-custom-web-service-for-sharepoint-13553"&gt;http://it.toolbox.com/blogs/sharepoint-blog/creating-a-custom-web-service-for-sharepoint-13553&lt;/a&gt;.&amp;nbsp; However, I never got mine working but you might have a better chance.&amp;nbsp; In any case, once you have your Web Service working publish it to your internal IIS server.&amp;nbsp; You can also publish it on the IIS SharePoint uses.&amp;nbsp; If you do that, I recommend putting it on a different port than 80.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Step 2. Create your InfoPath form and connect it to the Web Service.&amp;nbsp; If you are submitting data to the Web Service, go to Tools\Submit Options and follow below:&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Under &amp;#39;Send form data to a single destination&amp;#39;, select &amp;#39;Web Servie&amp;#39;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click on Add.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Enter the URL to your Web Service, like &lt;a href="http://%3cweb/"&gt;http://&amp;lt;web&lt;/a&gt; server&amp;gt;/&amp;lt;web service&amp;gt;.asmx?WSDL and click on Next&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Under &amp;#39;Select an operation&amp;#39; select the function you want to use and click Next.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Here you must associate each parameter of the function to a field on your InfoPath form.&amp;nbsp; So for instance, if your are submitting &amp;#39;FirstName&amp;#39;, you would highlight the &amp;#39;firstname&amp;#39; parameter and under &amp;#39;Field or group&amp;#39; you would pick the &amp;#39;FirstName&amp;#39; field so it would look like this: /my:myFields/my:FirstName.&amp;nbsp; Once done associating all the parameters, click Next.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Give the connection a name and Finish.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;
&lt;div&gt;Step 3. Enable SSO.&amp;nbsp; See my previous post.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Step 4.&amp;nbsp;Create a Connection Library on your SharePoint.&amp;nbsp; After doing so just copy the URL.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Step 5. Convert your Web Service connection into a Universal Data Connection (udcx).&amp;nbsp; Go back to your InfoPath form and under Manage&amp;nbsp;Data Connections do the following:&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Highlight the Web Service connection and click on Convert.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Paste in the URL of the Connection Library you just created and click OK.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;That&amp;#39;s it; you&amp;#39;ll now have a udcx connection in your Connection Library waiting for you to approve but don&amp;#39;t do it yet.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Switch back to your Connection Library and download a copy of the new connection.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Edit the file in Notepad or SharePoint Designer 2007 (it&amp;#39;s also free, now).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Enter the SSO authenitcation.&amp;nbsp; See my previous post above.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Back to the Connection Library we go.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Delete the udcx file you have there (the one you downloaded).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Click on New Universal Data Connection File and upload the one with the SSO authentication.&amp;nbsp; Don&amp;#39;t try changing the Title.&amp;nbsp; You can&amp;#39;t.&amp;nbsp; There is a way but beyond this post.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Approve it&amp;nbsp;and you are done here.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;
&lt;div&gt;Step 6.&amp;nbsp; Test InfoPath form with the new udcx connection.&amp;nbsp; Test out your form on your client machine.&amp;nbsp; If all is good you can proceed to the last step.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Step 7.&amp;nbsp; Pulbish your InfoPath form as a web based form to a Forms library.&amp;nbsp; Make sure you turn on &amp;#39;Display as a Web page&amp;#39; under the Advanced Settings.&amp;nbsp; Try it out and post back for issues ;-)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;These are pretty much the basic steps to get a Web Service working with Web Based Forms.&amp;nbsp; Hope this post was helpful.&lt;/p&gt;</description></item><item><title>Re: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42507.aspx</link><pubDate>Fri, 05 Jun 2009 03:36:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42507</guid><dc:creator>patrick1628</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42507.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42507</wfw:commentRss><description>&lt;p&gt;Hi There,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Can you please let us know how this is done. This is very similar to what I am trying to do nd I hve no idea how to get it done. Please help..like creating a web service for sharepoint etc&lt;/p&gt;</description></item><item><title>Re: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42266.aspx</link><pubDate>Fri, 29 May 2009 17:11:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42266</guid><dc:creator>IPSeeker</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42266</wfw:commentRss><description>&lt;p&gt;Thank you for your eagerness to help me.&lt;/p&gt;
&lt;p&gt;Finally figured it out.&amp;nbsp; Got a lot of hints from this post (&lt;a href="http://www.infopathdev.com/forums/t/10213.aspx"&gt;http://www.infopathdev.com/forums/t/10213.aspx&lt;/a&gt;).&amp;nbsp; Read a lot of posts until I got to this one.&amp;nbsp; Most never mentioned that when you use NTLM authentication, you have to use a udcx connection and Single Sing On (SSO).&amp;nbsp; SSO is now my new&amp;nbsp;best friend.&amp;nbsp; So just to summarize for the next person who has difficulties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Build your web service as you normally would.&amp;nbsp; HINT:&amp;nbsp;You can use MS Visual Web Developer 2008 Express Edition for free!&amp;nbsp; Awesome product.&amp;nbsp; If you are adding records to a SQL 2005&amp;nbsp;DB and above, just create an Endpoint Web Service; will save you a lot of work.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Connect your InfoPath form to the Web Service.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Convert the Web Service connection to a udcx and upload it to a Data Connection Library on your SharePoint.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Configure SSO on your MOSS 2007 server; see this post (&lt;a href="http://blogs.devhorizon.com/reza/?p=832"&gt;http://blogs.devhorizon.com/reza/?p=832&lt;/a&gt;).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Edit your udcx connection to use SSO.&amp;nbsp; Just uncomment and edit this line in your udcx file, &lt;em&gt;&amp;lt;udc:Authentication&amp;gt;&amp;lt;udc:SSO AppId=&amp;#39;&amp;lt;SSO App ID&amp;gt;&amp;#39; CredentialType=&amp;#39;ntlm&amp;#39; /&amp;gt;&amp;lt;/udc:Authentication&amp;gt;&lt;/em&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Update the udcx connection in your Data Connection Library.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Update your InfoPath form to the new udcx conection.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Publish your InfoPath form as a web-based form and you are done!&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>Re: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42195.aspx</link><pubDate>Thu, 28 May 2009 07:21:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42195</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42195.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42195</wfw:commentRss><description>&lt;p&gt;Questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Did you admin approve the UDC connection?&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Did you admin adpprove the InfoPath form on SharePoint? This is only required if you have code. Not sure, so worth doing.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the InfoPath Designer, go to Tools-&amp;gt;Form Options-&amp;gt;Security. What is the setting? It should be Domain Trust.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Using Internet&amp;nbsp;Explorer, go to the SharePoint site and look at the lower&amp;nbsp;right corner in the status bar. Does it show &amp;quot;Local Intranet&amp;quot;?&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Do you have the source code for the Web Service? &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>Re: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42162.aspx</link><pubDate>Wed, 27 May 2009 15:45:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42162</guid><dc:creator>IPSeeker</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42162.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42162</wfw:commentRss><description>&lt;p&gt;Thank you for the response.&lt;/p&gt;
&lt;p&gt;I created a UDC connection as suggested in this post &lt;a href="http://www.infopathdev.com/forums/t/6781.aspx"&gt;http://www.infopathdev.com/forums/t/6781.aspx&lt;/a&gt;&amp;nbsp;but I still get the same error message.&amp;nbsp; The Web Service runs on the same server MOSS runs on.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know what else I should do.&lt;/p&gt;</description></item><item><title>Re: Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/42120.aspx</link><pubDate>Wed, 27 May 2009 06:52:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42120</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42120.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=42120</wfw:commentRss><description>&lt;p&gt;Hi IPSeeker,&lt;/p&gt;
&lt;p&gt;When you are using browser-enabled forms you will need to setup a UDC file for the data connection and SSO if it&amp;#39;s running on a separate server since SharePoint doesn&amp;#39;t forward credentials by default and your Web Service probably doesn&amp;#39;t impersonate some system account by default either. &lt;/p&gt;</description></item><item><title>Cannot submit data to Web Service for the life of me (401)</title><link>https://www.infopathdev.com:443/forums/thread/41940.aspx</link><pubDate>Thu, 21 May 2009 21:21:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41940</guid><dc:creator>IPSeeker</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41940.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=41940</wfw:commentRss><description>&lt;p&gt;I created a Web Service for Sharepoint.&amp;nbsp; All it does is add a record to a table in a SQL Database.&amp;nbsp; The connection to the SQL DB is through SQL authentication.&amp;nbsp; I created this Web Service the proper way, signed, disco, wsdl and&amp;nbsp;assembly on the SharePoint server.&amp;nbsp; I created a Web Application to consume the Web Service and it works like a charm.&amp;nbsp; It also works great with the&amp;nbsp;InfoPath form when used from a client.&amp;nbsp; However when published to a SharePoint library, it errors out when I submit the form.&amp;nbsp; The error I get in the SharePoint Log is as follows:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The remote server returned an error: (401) Unauthorized&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked all over the Internet but nothing is clear.&amp;nbsp; When I consume the WS, I have to pass authentication to it in order for it to work.&amp;nbsp; Do I have to do the same when I publish the form?&lt;/p&gt;
&lt;p&gt;Any advice is greatly appreciated.&lt;/p&gt;</description></item></channel></rss>