<?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>Re: Dynamically change URL of web service</title><link>https://www.infopathdev.com:443/forums/thread/22398.aspx</link><pubDate>Fri, 17 Aug 2007 17:43:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22398</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22398.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22398</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is how you can change the Web Service URL of a data connection.&lt;/p&gt;
&lt;p&gt;IXMLDOMDocument webserviceOperation;&lt;br /&gt;WebServiceAdapter2 webserviceAdapter = (WebServiceAdapter2) thisXDocument.DataAdapters[dataAdapterName];&lt;/p&gt;
&lt;p&gt;webserviceOperation = thisXDocument.CreateDOM();&lt;br /&gt;webserviceOperation.loadXML(webserviceAdapter.Operation);&lt;br /&gt;SetNodeValue(webserviceOperation.documentElement, &amp;quot;@serviceUrl&amp;quot;, url);&lt;br /&gt;webserviceAdapter.Operation = webserviceOperation.xml;&lt;/p&gt;</description></item><item><title>Dynamically change URL of web service</title><link>https://www.infopathdev.com:443/forums/thread/22311.aspx</link><pubDate>Mon, 13 Aug 2007 19:26:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22311</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22311.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22311</wfw:commentRss><description>&lt;p&gt;I did a search through the threads and several googles but I could not find anything for this.&lt;/p&gt;&lt;p&gt;I have a web service setup as a data connection.&lt;/p&gt;&lt;p&gt;What I would like to do is on certain events, change the URL of the data connection in code i.e., jscript. What is required for this to occur?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;</description></item></channel></rss>