WebService Behavior

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

This section contains reference information for the WebService behavior.

Overviews/Tutorials

About the WebService Behavior

The WebService behavior enables client-side script to invoke remote methods exposed by Web Services, or other Web servers, that support the SOAP and Web Services Description Language (WSDL) 1.1. This behavior provides developers the opportunity to use and leverage SOAP, without requiring expert knowledge of its implementation. The WebService behavior supports the use of a wide variety of data types, including intrinsic SOAP data types, arrays, objects, and XML data. The WebService behavior is implemented with an HTML Component (HTC) file as an attached behavior, so it can be used in Microsoft Internet Explorer 5 and later versions.

Using the WebService Behavior

This article explains how to use the WebService behavior to call remote methods from Web Services. The WebService behavior is implemented with an HTC file as an attached behavior, so it can be used in Internet Explorer 5 and later versions. Most of this article focuses on how to use the WebService behavior, but it also touches briefly on Web Services that are used by the WebService behavior. The About the WebService Behavior provides additional discussion and information on the main benefits and features of the WebService behavior; it also provides numerous links to related Web sites.

WebService Behavior: Supported Data Types

This document describes the ASP.NET and XML data types supported by the WebService behavior.

Elements and Objects

call

A script object that can be passed as a parameter to the callService method.

errorDetail

This object is exposed by the result object if an error is encountered from an invocation of the callService method. The properties of errorDetail provide detailed information and diagnostics on the error.

result

This object exposes the results and brief diagnostics for an invocation of the callService method.

useOptions

An object that can be passed as a parameter to the useService method.

Attributes and Properties

async

Specifies the mode of remote method invocation.

code

A machine-readable error code that corresponds to a specific invocation of the callService method.

endpoint

A property of the call object that specifies an URL that can be used to obtain the WSDL for a Web Service.

error

A Boolean property created by the WebService behavior after calling the callService method.

funcName

Specifies the name of a remote function exposed by a Web Service.

id

A property of the result object that has a unique value which corresponds to a specific execution of the callService method.

params

A property of the call object that specifies an associative array of parameter values.

password

Specifies a password for Web Services that require user authentication.

portName

Specifies a port name that is used to access resources provided by a Web Service.

raw

Exposes the raw SOAP data packet returned by the Web Service after invoking the callService method.

reuseConnection

Specifies the persistence of the connection information required by Web services that use Secure Sockets Layer (SSL) authentication.

serviceAvailable

Indicates whether the WSDL information was returned successfully from an invocation of the useService method.

serviceUrl

Specifies the URL of a Web Service.

SOAPHeader

An Array of SOAP headers that overrides the default SOAP header generated by the WebService behavior.

string

A human-readable error message that corresponds to a specific invocation of the callService method.

timeout

Not supported.

userName

Specifies a user name for Web Services that require user authentication.

userName

Retrieves the sFriendlyName parameter that is passed to the useService method.

value

A property of the result object that is created at run time.

WSDL

The WSDL returned by a Web Service after an invocation of the useService method.

Methods

callService

Calls a method that is implemented on a Web Service.

createCallOptions

Creates an instance of call object that can be passed as a parameter to the callService method.

createUseOptions

Creates a useOptions object that can be passed as a parameter to the useService method.

useService

Establishes a friendly name for a Web Service URL that can be referenced from script.

Events

onresult

Fires when a result has been received from a remote method callService using the WebService behavior.

onserviceavailable

Fires after the WebService behavior has attempted to obtain the WSDL from a Web Service.

Community Additions

Show: