I want to be able to set the query parameter of the webservice.so I have done this:
Dim fieldValue
fieldValue = thisXDocument.DOM.selectSingleNode("/my:myFields/my:field3")
'Get a reference to the Web Service data connection
Dim theDataObject
theDataObject = thisXDocument.DataObjects.Item("GetPatientCDA").DOM
'Set the SelectionNamespaces property so you can navigate the web service XML()
theDataObject.setProperty("SelectionNamespaces", "xmlns:dfs=""http:/schemas.microsoft.com/office/infopath/2003/dataFormSolution"" " + "xmlns:tns=""http:/tempuri.org/""")
'Get a reference to the parameter in the web service
Dim queryValue1
queryValue1 = theDataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetPatientCDA/tns:given")
'Set the parameter value to dropdown box selection
queryValue1.text = fieldValue.text
Dim queryValue2
queryValue2 = theDataObject.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetPatientCDA/tns:family")
'Set the parameter value to dropdown box selection
queryValue1.text = fieldValue.text
theDataObject.Query()
But, It fails at SelectionNamespaces ?! here is the error :
System.MethodAccessException
Attempt to access the method failed.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
Is there a way to confirm this namespace ? does the manifest have it ?
Any help appreciated.
Thanks.