Hi everyone,
I have been searching for a week but cannot find a solution to my problem. I am hoping that someone here can help me out.
I have a MOSS webservice that I need to call (http://moss/_vti_bin/usergroup.asmx) and pass in a parameter (current username). Then I would like to loop through the resultset and add the values to a drop-down list. Can someone help me out with the code? Thanks, much appreciated.
yu217171
**************************************
**Update: Code Below**
Hi everyone,
I have found how to dynamically query a web service passing in a dynamic parameter. Here is the code below.
<code>
IXMLDOMDocument3 wsDOM =(IXMLDOMDocument3)thisXDocument.DataObjects["DataConnectionName"].DOM;
//Set the SelectionNamespaces so that you can find the correct field
wsDOM.setProperty("SelectionNamespaces",
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\""
+ " xmlns:tns=\"http://schemas.microsoft.com/sharepoint/soap/directory/\"");
//thisXDocument.UI.Alert(wsDOM.xml); <-- I used this to get the soap envelope and the xpath to the parameters and to find out which namespaces to set.
wsDOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetUserCollectionFromGroup/tns:groupName").text = "ActionUsers"; <-- Put your variable here
thisXDocument.DataObjects["DataConnectionName"].Query(); <-- Call the Query method to execute the webservice call
</code>