Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WebServiceAdapterObject interface

Represents a connection to an XML Web service.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
[GuidAttribute("096CD5D4-0786-11D1-95FA-0080C78EE3BB")]
public interface WebServiceAdapterObject : WebServiceAdapter2

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.

If a Web service is used as the primary data source for a form, the WebServiceAdapterObject object is accessible through QueryAdapter 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:

string input;
input = wsAdapter2.Input;
NoteNote

In this case, the QueryAdapter property was used to access the Input property of the WebServiceAdapter object.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.