<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Setting WebService query parameter via code</title><link>https://www.infopathdev.com:443/forums/thread/6980.aspx</link><pubDate>Wed, 22 Jun 2005 02:25:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6980</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6980.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6980</wfw:commentRss><description>Hi Richard,&lt;br /&gt;Any more info on the error code? Looks like the property may not support modifying in code.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Setting WebService query parameter via code</title><link>https://www.infopathdev.com:443/forums/thread/4718.aspx</link><pubDate>Thu, 16 Jun 2005 23:57:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4718</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4718.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4718</wfw:commentRss><description>I want to be able to set the query parameter of the webservice.so I have done this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim fieldValue&lt;br /&gt;fieldValue = thisXDocument.DOM.selectSingleNode("/my:myFields/my:field3")&lt;br /&gt;'Get a reference to the Web Service data connection&lt;br /&gt;Dim theDataObject&lt;br /&gt;theDataObject = thisXDocument.DataObjects.Item("GetPatientCDA").DOM&lt;br /&gt;'Set the SelectionNamespaces property so you can navigate the web service XML()&lt;br /&gt;theDataObject.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;Dim queryValue1&lt;br /&gt;queryValue1 = theDataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetPatientCDA/tns:given")&lt;br /&gt;&lt;br /&gt;'Set the parameter value to  dropdown box selection&lt;br /&gt;queryValue1.text = fieldValue.text&lt;br /&gt;Dim queryValue2&lt;br /&gt;queryValue2 = theDataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetPatientCDA/tns:family")&lt;br /&gt;&lt;br /&gt;'Set the parameter value to  dropdown box selection&lt;br /&gt;queryValue1.text = fieldValue.text&lt;br /&gt;                 theDataObject.Query()&lt;br /&gt;&lt;br /&gt;But, It fails at SelectionNamespaces ?! here is the error :&lt;br /&gt;System.MethodAccessException&lt;br /&gt;Attempt to access the method failed.&lt;br /&gt;   at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;Is there a way to confirm this namespace ? does the manifest have it ? &lt;br /&gt;&lt;br /&gt;Any help appreciated.&lt;br /&gt;Thanks.&lt;br /&gt;</description></item></channel></rss>