biwebservice2.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 335 行

HTML
335
字号
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--Generated using api.website.xsl version 2003-07-17--><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>BiWebService2</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript">				function showDerivedClasses() {					var ul = document.getElementById("api-derived-classes");					var lis = ul.childNodes;					var l = lis.length;					for (var i = 1; i < l; i++)						lis[i].style.display = "";					lis[0].style.display = "none";				}			</script></head><body><h1 id="BiWebService2">BiWebService2</h1><p>Construct a web service client. A <code><a href="BiWebService2.html">BiWebService2</a></code> object allows accessing web services through SOAP, based on a WSDL describing the services' interfaces. To use <code><a href="BiWebService2.html">BiWebService2,</a></code> first construct an object of this class. Then, call the object's useService method -- passing the URL to the WSDL describing the service and the service's name. Finally, call syncInvoke, asyncInvoke and callMethod to invoke service operations synchronously or asynchronously.</p><p>This class extends		<code><a href="BiEventTarget.html">BiEventTarget</a></code>		and therefore all methods and fields available for		<code><a href="BiEventTarget.html">BiEventTarget</a></code>		are also available for <code>BiWebService2</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEventTarget.html">BiEventTarget</a></code><ul><li><code>BiWebService2</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiWebService2()</code></p><h3>Parameters</h3><p>No parameters.</p><h2>Properties</h2><table><thead><tr><td>Name</td><td>Type</td><td class="get-header">get</td><td class="set-header">set</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="async"></a><code>async</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>This property determines whether or not calls made by the web service using callMethod and service loading using useService without specifying an async flag is done asynchronously.</td></tr><tr><td><a name="loaded"></a><code>loaded</code></td><td><code class="type">Boolean    Indication of whether the service is loaded and ready for action</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Return a boolean indicating whether the service is loaded and ready for action or not.</td></tr><tr><td><a name="wsdl"></a><code>wsdl</code></td><td><code class="type">				<code><a href="BiWsdl.html">BiWsdl</a></code>    WSDL object used to connect to the web service.</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Retrieve the WSDL object used to connect to the web service.</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#asyncInvoke">asyncInvoke</a></code></td><td>Invoke a web-service operation asynchronously. Return a cookie which will be passed in the wscallcomplete event to identify the completed call.</td></tr><tr><td><code><a href="#callMethod">callMethod</a></code></td><td>Invoke a web-service operation either synchronously or asynchronously, depending on the value of this._async. For asynchronous invocations return value, see asyncInvoke. For synchronous invocations return value, see syncInvoke.</td></tr><tr><td><code><a href="#popCallContext">popCallContext</a></code></td><td>Pop a call context object from the stack.</td></tr><tr><td><code><a href="#pushCallContext">pushCallContext</a></code></td><td>Push a call context object to the stack. This object will server as the call context of all subsequent calls until a call to popCallContext (or another call to pushCallContext)</td></tr><tr><td><code><a href="#syncInvoke">syncInvoke</a></code></td><td>Invoke a web-service operation synchronously. Return the invoked service's result, or throw an exception in case of an error or a service-returned fault. The function returns the operation's result if the operation doesn't include out parameters; it returns an object consisting of a field named 'result' storing the return value and additional fields for each out parameter if out parameters exist.</td></tr><tr><td><code><a href="#useService">useService</a></code></td><td>Prepare this WebService2 object to operate a web service described in a WSDL document.</td></tr></tbody></table><h2>Events</h2><table><thead><tr><td>Name</td><td>Type</td><td class="bubbles-header">Bubbles</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="callcomplete"></a><code>callcomplete</code></td><td><code class="type">				<code><a href="BiWsCallCompleteEvent.html">BiWsCallCompleteEvent</a></code>			</code></td><td class="bubbles-column"></td><td>Notifies that an asynchronous web service operation invocation                                               was completed, either succesfuly or with errors.</td></tr><tr><td><a name="serviceloaded"></a><code>serviceloaded</code></td><td><code class="type">				<code><a href="BiEvent.html">BiEvent</a></code>			</code></td><td class="bubbles-column"></td><td>Notifies that loading the WSDL used to describe the service represented by this                                  instance is complete. If the event has an 'err' member, this describes an error 			             which occurred during loading.</td></tr></tbody></table><h2>Static Methods</h2><p>None.</p><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p>	</p><h2>Method Details</h2><h3><a name="asyncInvoke"></a>asyncInvoke</h3><p>Invoke a web-service operation asynchronously. Return a cookie which will be passed in the wscallcomplete event to identify the completed call.</p><h4>Syntax</h4><pre class="method-syntax">object.asyncInvoke(<span class="methodArgument">aOpName</span>, <span class="methodArgument">other</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aOpName</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>Name of operation to invoke</td></tr><tr><td><code>other</code></td><td><code class="type">arguments</code></td><td class="optional-column"></td><td></td><td>Web service operation invocation parameters</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="callMethod"></a>callMethod</h3><p>Invoke a web-service operation either synchronously or asynchronously, depending on the value of this._async. For asynchronous invocations return value, see asyncInvoke. For synchronous invocations return value, see syncInvoke.</p><h4>Syntax</h4><pre class="method-syntax">object.callMethod(<span class="methodArgument">aOpName</span>, <span class="methodArgument">other</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aOpName</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>Name of operation to invoke</td></tr><tr><td><code>other</code></td><td><code class="type">arguments</code></td><td class="optional-column"></td><td></td><td>Web service operation invocation parameters</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Object</code></p><h3><a name="popCallContext"></a>popCallContext</h3><p>Pop a call context object from the stack.</p><h4>Syntax</h4><pre class="method-syntax">object.popCallContext()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="pushCallContext"></a>pushCallContext</h3><p>Push a call context object to the stack. This object will server as the call context of all subsequent calls until a call to popCallContext (or another call to pushCallContext)</p><h4>Syntax</h4><pre class="method-syntax">object.pushCallContext(<span class="methodArgument">aContext</span>, <span class="methodArgument">aAdditive</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aContext</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>Context object to push.</td></tr><tr><td><code>aAdditive</code></td><td><code class="type">Boolean</code></td><td class="optional-column"></td><td></td><td>Should fields of current call context be added to this call context? (unless named the 						same as existing fields)</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="syncInvoke"></a>syncInvoke</h3><p>Invoke a web-service operation synchronously. Return the invoked service's result, or throw an exception in case of an error or a service-returned fault. The function returns the operation's result if the operation doesn't include out parameters; it returns an object consisting of a field named 'result' storing the return value and additional fields for each out parameter if out parameters exist.</p><h4>Syntax</h4><pre class="method-syntax">object.syncInvoke(<span class="methodArgument">aOpName</span>, <span class="methodArgument">other</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aOpName</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>Name of operation to invoke</td></tr><tr><td><code>other</code></td><td><code class="type">arguments</code></td><td class="optional-column"></td><td></td><td>Web service operation invocation parameters</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Object</code></p><h3><a name="useService"></a>useService</h3><p>Prepare this WebService2 object to operate a web service described in a WSDL document.</p><h4>Syntax</h4><pre class="method-syntax">object.useService(<span class="methodArgument">aWsdlUri</span>, <span class="methodArgument">aServiceName</span>, <span class="methodArgument">aAsync</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aWsdlUri</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>URL to WSDL describing service desired to be accessed</td></tr><tr><td><code>aServiceName</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>Name of service to access</td></tr><tr><td><code>aAsync</code></td><td><code class="type">Boolean</code></td><td class="optional-column"></td><td></td><td>If true, call will be asyncly processed; if false, call will return only                          after the WSDL is available and parsed.</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?