This section describes the properties that are common to the <mx:RemoteObject>, <mx:WebService>, and <mx:HTTPService> tags, and the properties that are specific to each tag.
The <mx:RemoteObject>, <mx:WebService>, and <mx:HTTPService> tags have the following properties in common:
| Property | Description |
|---|---|
concurrency |
The default value for the
|
fault |
The default value for the handler for the When no event handler is specified for faults at the web service operation level or remote object service method level, the faults are passed to the The following example tag specifies a handler for the <!-- The specified WSDL URl is not functional. -->
<mx:WebService id="myWebService"
wsdl="/ws/WeatherService?wsdl" |
id |
The instance name that you use to refer to the web services, HTTP service, or remote object service in ActionScript code. |
protocol |
Specifies the protocol to use for service requests. The value is either The default value is the protocol over which the user loads the application. To access a service over HTTPS from a Flex application that is served over HTTP, you must set the |
result |
The default value for the handler for the |
showBusyCursor |
When set to |
useProxy |
For web services and HTTP services, you can bypass the Flex proxy by setting the |
The <mx:RemoteObject> tag contains the following properties in addition to those described in Common data service properties:
| Property | Description |
|---|---|
endpoint |
A specific alternative gateway endpoint. This property overrides the default (global) gateway endpoint in the You cannot use the The |
id |
The instance name that you use to refer to the Java object in ActionScript code. |
named |
A named service that is specified in the flex-config.xml file. If you use the |
source |
Required for unnamed services; the source of the object. |
type |
The type of object access. The default type is
The For named services, you can specify |
The <mx:WebService> tag contains the following properties in addition to those described in Common data service properties:
| Property | Description |
|---|---|
load |
The value of the event handler for successful web service initialization. |
service |
A specific service name. Use when a WSDL document contains more than one service definition. |
port |
A specific port name. Use when a WSDL document contains more than one port definition. You only need to use a <service name="Shakespeare"> |
serviceName |
A named service that is specified in the flex-config.xml file. If you use the |
wsdl |
The WSDL document for a web service. |
Note: The capitalization of WSDL URLs and the names of operations, arguments, services, and ports must match those that you defined for the web service.
The <mx:HTTPService> tag contains the following properties in addition to those described in Common data service properties:
| Property | Description |
|---|---|
contentType |
The type of content for service requests. The following values are permitted:
|
method |
The HTTP method for sending the request. Permitted values are |
resultFormat |
The value that indicates how you want to deserialize the result returned by the HTTP call. The value for this is based on the following:
The following values are permitted:
|
serviceName |
A named service that is specified in the flex-config.xml file. If you use the |
url |
The location of the service. The specified URL should not contain any query arguments (question mark character (?) followed by name-value pairs). |
xmlDecode |
ActionScript function used to decode a service result from XML. When The
The following example shows an <mx:HTTPService id="hs" The following example shows an function xmlDecoder ( myXML ) {
// Simplified decoding logic.
var myObj = new Object();
myObj.name = myXML.firstChild.nodeValue;
myObj.honorific = myXML.firstChild.attributes.honorific;
return myObj;
}
|
xmlEncode |
ActionScript function used to encode a service request as XML. When the contentType of a request is application/xml and the request object passed in is an object, Flex attempts to use the function specified in the The
The following example shows an <mx:HTTPService id="hs"
The following example shows an function xmlEncoder ( myObj ) {
return new XML("<userencoded><attrib0>MyObj.test</attrib0>
<attrib1>MyObj.anotherTest</attrib1></userencoded>");
}
|
Version 1.5
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000782.htm
Comments
peterent said on Feb 17, 2005 at 5:56 AM :