Add a button to the your form and the following code behind will help you access the Web service adapter and do actiosn with it
var oXml = XDocument.DataObjects["GetSurveyVersion"];
oXml.DOM.setProperty("SelectionNamespaces", 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:s0="http://autonomysystems.com/webservices/"');
Then you do various actions like
oXml.Query();
Shanthi
InfoPathDev India
Shanthi Reddy