Operation Property (WebServiceAdapter Object)

Microsoft Office InfoPath

Sets or retrieves a string value that contains the source XML of the operation element contained in the form definition (.xsf) file.

expression.Operation

expression    Required. An expression that returns a reference to the WebServiceAdapter object.

Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Remarks

The operation element of the .xsf file contains information about the Web service, including its name, the method used for retrieving and submitting data, and its Uniform Resource Locator (URL).

Example

In the following example, the Operation property of the WebServiceAdapter object is used to display the operation string of the Web service data adapter in a message box:

var objWSAdapter;

objWSAdapter = XDocument.DataObjects("WebCityList").QueryAdapter;
XDocument.UI.Alert("Operation string: " + objWSAdapter.Operation);