1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01021251"><META NAME="lcid" CONTENT="1033"><title>WebServiceAdapter Object</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>WebServiceAdapter Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><table class="ofvbaomart"><tr><td class="noborder" nowrap="true"><A HREF="xdobjWebServiceAdapter.htm" title="WebServiceAdapter"><SPAN class="omblue">WebServiceAdapter</SPAN></A><br /></td></tr></table><p>Represents a connection to an XML Web service. The <b class="bterm">WebServiceAdapter</b> object is a type of Microsoft Office InfoPath 2003 <a href="#" class="glossary" onclick="AppendPopup(this,'xddataadapter')" onkeypress="AppendPopup(this,'xddataadapter')">data adapter</a> that contains all the information necessary for retrieving data from and submitting data to an external data source.</p><h2>Remarks</h2><p>The <b class="bterm">WebServiceAdapter</b> object 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 <a href="#" class="glossary" onclick="AppendPopup(this,'ofURL')" onkeypress="AppendPopup(this,'ofURL')">Uniform Resource Locator (URL)</a> of the Web Services Description Language (WSDL) file of the XML Web service.</p><h2>Using the WebServiceAdapter object</h2><p>For <a href="#" class="glossary" onclick="AppendPopup(this,'xdsecondarydatasource')" onkeypress="AppendPopup(this,'xdsecondarydatasource')">secondary data sources</a>, the <b class="bterm">WebServiceAdapter</b> object is accessible through the <b class="bterm"><a href="xdproQueryAdapter_2.htm" id="HV01021320" lcid=" ">QueryAdapter</a></b> property of the <b class="bterm"><a href="xdobjDataObject.htm" id="HV01024616" lcid=" ">DataObject</a></b> object, and <b class="bterm">DataObject</b> objects are accessible through the <b class="bterm"><a href="xdproDataObjects.htm" id="HV01021279" lcid=" ">DataObjects</a></b> property of the <b class="bterm"><a href="xdobjXDocument.htm" id="HV01021254" lcid=" ">XDocument</a></b> object.</p><p>If a Web service is used as the primary data source for a form, the <b class="bterm">WebServiceAdapter</b> object is accessible through the <b class="bterm"><a href="xdproQueryAdapter_1.htm" id="HV01021319" lcid=" ">QueryAdapter</a></b> property of the <b class="bterm">XDocument</b> object.</p><p>In the following example, a reference to the <b class="bterm">WebServiceAdapter</b> object is set by using the <b class="bterm">QueryAdapter</b> property of the <b class="bterm">DataObject</b> object by passing the name of the <b class="bterm">DataObject</b> object to the <b class="bterm"><a href="xdproItem_7.htm" id="HV01021304" lcid=" ">Item</a></b> property of the <b class="bterm">DataObjects</b> collection:</p><pre><code>var objWSAdapter;
objWSAdapter = XDocument.DataObjects("GetCityList").QueryAdapter;</code></pre><p>After the reference has been set, you can use the properties of the <b class="bterm">WebServiceAdapter</b> object as shown in the following example, which sets a reference to the XML node returned by the <b class="bterm"><a href="xdproInput.htm" id="HV01021286" lcid=" ">Input</a></b> property:</p><pre><code>var objInputNode;
objInputNode = XDocument.DataObjects("GetCityList").QueryAdapter.Input;</code></pre><p>Note that in this case, the <b class="bterm">QueryAdapter</b> property was used to access the <b class="bterm">Input</b> property of the <b class="bterm">WebServiceAdapter</b> object.</p><p>For more information about using the <b class="bterm">WebServiceAdapter</b> object, see <a href="inconAccessingExternalDataSources.htm" id="HV01039914" lcid=" ">Accessing external data sources</a>.</p><p> </p><p>The <b class="bterm">WebServiceAdapter</b> object contains the following properties:</p><table><tr><th>Property</th><th>Description</th></tr><tr><td><a href="xdproErrorsLocation_HV01104028.htm" id="HV01104028" lcid=" "><b class="bterm">ErrorsLocation</b></a></td><td>A property of type <b class="bterm">IXMLDOMNode</b> that sets or retrieves the errors node under which the <b class="bterm">WebServiceAdapter</b> object will write the error details returned by the Web service. The initial value is <b class="bterm">null</b>.</td></tr><tr><td><a href="xdproInput.htm" id="HV01021286" lcid=" "><b class="bterm">Input</b></a></td><td>Sets or retrieves a string that contains the source XML of the input element contained in the <a href="#" class="glossary" onclick="AppendPopup(this,'xdformdefinitionfilexsf')" onkeypress="AppendPopup(this,'xdformdefinitionfilexsf')">form definition file (.xsf)</a>.</td></tr><tr><td><a href="xdproName_11_HV01107147.htm" id="HV01107147" lcid=" "><b class="bterm">Name</b></a></td><td>A read-only property of type <b class="bterm">String</b> that returns the name of the <b class="bterm">WebServiceAdapter</b> object.</td></tr><tr><td><a href="xdproOperation_1.htm" id="HV01021315" lcid=" "><b class="bterm">Operation</b></a></td><td>Sets or retrieves a string that contains the source XML of the <b class="bterm">operation</b> element contained in the form definition (.xsf) file.
</td></tr><tr><td><a href="xdproOutputLocation_HV01104041.htm" id="HV01104041" lcid=" "><b class="bterm">OutputLocation</b></a></td><td>A property of type <b class="bterm">IXMLDOMNode</b> that sets or retrieves the output node under which the <b class="bterm">WebServiceAdapter</b> object will copy the returned XML.</td></tr><tr><td><a href="xdproQueryAllowed_HV01104042.htm" id="HV01104042" lcid=" "><b class="bterm">QueryAllowed</b></a></td><td>A read-only property of type <b class="bterm">Boolean</b> that corresponds to the <b class="bterm">queryAllowed</b> attribute in the form definition (.xsf) file.</td></tr><tr><td><a href="xdproSubmitAllowed_HV01104051.htm" id="HV01104051" lcid=" "><b class="bterm">SubmitAllowed</b></a></td><td>A read-only property of type <b class="bterm">Boolean</b> that corresponds to the <b class="bterm">submitAllowed</b> attribute in the form definition file (.xsf).</td></tr><tr><td><a href="xdproTimeout_2_HV01106967.htm" id="HV01106967" lcid=" "><b class="bterm">Timeout</b></a></td><td>A property of type <b class="bterm">Long</b> that sets or retrieves the length of time, in seconds, for the <b class="bterm">WebServiceAdapter</b> object to time-out on subsequent requests. The default value is 30 seconds.</td></tr><tr><td><a href="xdproWSDLURL.htm" id="HV01021358" lcid=" "><b class="bterm">WSDLURL</b></a></td><td>A read-only property that returns a string that contains the Uniform Resource Locator (URL) of the Web Services Description Language (WSDL) file for the Web service associated with the <b class="bterm">WebServiceAdapter</b> object.</td></tr></table><p>The WebServiceAdapter object contains the following methods:</p><table><tr><th>Method</th><th>Property</th></tr><tr><td><a href="xdmthGenerateDataSetDiffGram_HV01103977.htm" id="HV01103977" lcid=" "><b class="bterm">GenerateDataSetDiffGram</b></a></td><td>Returns an ADO.Net DataSet containing an inline schema describing the data and the DiffGram of the DataSet. The DiffGram for the input dataDom is generated, using the sibling node <b class="bterm">OriginalData</b> to compute the difference between the <b class="bterm">OriginalData</b> and the input dataDom.</td></tr><tr><td><a href="xdmthQuery_6_HV01106970.htm" id="HV01106970" lcid=" "><b class="bterm">Query</b></a></td><td>Executes the <b class="bterm">Query</b> method on the <b class="bterm">WebServiceAdapter</b> object. Fails if the <b class="bterm">QueryAllowed</b> property is <b class="bterm">False</b>.</td></tr><tr><td><a href="xdmthSubmit_2_HV01106975.htm" id="HV01106975" lcid=" "><b class="bterm">Submit</b></a></td><td>Executes the <b class="bterm">Submit</b> method on the <b class="bterm">WebServiceAdapter</b> object. Fails if the <b class="bterm">SubmitAllowed</b> property is <b class="bterm">False</b>.</td></tr></table><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/xdobjWebServiceAdapter_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>
Permission to copy, display and distribute this document is available at: <a
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033"
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>
|