Represents a connection to an XML Web service.
Assembly: Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeWebServiceAdapter2.
The WebServiceAdapterObject object is a type of Microsoft Office InfoPath 2003 data adapter that contains all the information necessary for retrieving data from and submitting data to an external data source.
The WebServiceAdapterObject provides properties that can be used to get and set information about the data adapter's input and operation strings. It also provides a property for getting the Uniform Resource Locator (URL) of the Web Services Description Language (WSDL) file of the XML Web service.
For secondary data sources, the WebServiceAdapterObject object is accessible through the QueryAdapter property of the DataSourceObject object and the Item property of the DataAdaptersCollection. Data objects are accessible through the DataObjects property of the XDocument object.
In the following example, a reference to the WebServiceAdapter object is set by using the QueryAdapter property of the DataSourceObject object by passing the name of the DataSourceObject object to the Item property of the DataObjectsCollection collection:
WebServiceAdapter2 wsAdapter2; wsAdapter2 = (WebServiceAdapter2) thisXDocument.DataObjects["WebCityList"].QueryAdapter;
After the reference has been set, you can use the properties of the WebServiceAdapter object as shown in the following example, which sets a reference to the string returned by the Input property: