| Package | org.orpheus.xml.bind.mxml |
| Class | public class XMLService |
| Inheritance | XMLService XMLService mx.rpc.http.HTTPService |
| Implements | mx.core.IMXMLObject, mx.rpc.mxml.IMXMLSupport |
<mxml:XMLService> tag to represent an
XMLService object in an MXML file. When you call the XMLService object's
send() method, it makes an HTTP request to the
specified URL, and an HTTP response is returned. Optionally, you can pass
parameters to the specified URL. When you do not go through the server-based
proxy service, you can use only HTTP GET or POST methods. However, when you set
the useProxy property to true and you use the server-based proxy service, you
can also use the HTTP HEAD, OPTIONS, TRACE, and DELETE methods.
Note: Due to a software limitation, XMLService does not generate user-friendly error messages when using GET.
MXML Syntax
Hide MXML Syntax
The <mxml:XMLService> tag accepts the following tag attributes:
<mxml:XMLService Properties concurrency="multiple|single|last" contentType="application/x-www-form-urlencoded|application/xml" destination="DefaultHTTP" id="No default." method="GET|POST|HEAD|OPTIONS|PUT|TRACE|DELETE" resultFormat="object|array|xml|e4x|flashvars|text" showBusyCursor="false|true" makeObjectsBindable="false|true" url="No default." useProxy="false|true" xmlEncode="No default." xmlDecode="No default." Events fault="No default." result="No default." />The
<mxml:XMLService> tag can have a single <mx:request> tag under which the parameters can be specified.
Author: Andrew Lewisohn
Version: $Revision: 31 $, $Date: 2009-02-12 17:01:41 -0500 (Thu, 12 Feb 2009) $, $Author: alewisohn $
Since: 0.1
See also
| Property | Defined by | ||
|---|---|---|---|
| concurrency : String
Value that indicates how to handle multiple calls to the same service.
| XMLService | ||
| showBusyCursor : Boolean
If
true, a busy cursor is displayed while a service is executing. | XMLService | ||
| Method | Defined by | ||
|---|---|---|---|
|
XMLService(context:IEvaluationContext = null, rootURL:String = null, destination:String = null)
Creates a new XMLService.
| XMLService | ||
|
initialized(document:Object, id:String):void
Called after the implementing object has been created and all
component properties specified on the MXML tag have been
initialized.
| XMLService | ||
![]() |
registerClass(type:Object, definition:Object):void
Registers the class (type) of an object for when the object is encoded/decoded
to/from XML.
| XMLService | |
|
send(parameters:Object = null):AsyncToken
Executes an XMLService request.
| XMLService | ||
![]() |
unregisterClass(type:Object):void
Unregister the class (type) of an object so that it is no longer available
when encoding/decoding to/from XML.
| XMLService | |
| concurrency | property |
concurrency:String [read-write]
Value that indicates how to handle multiple calls to the same service. The default
value is multiple. The following values are permitted:
multiple Existing requests are not cancelled, and the developer is
responsible for ensuring the consistency of returned data by carefully
managing the event stream. This is the default value.single Only a single request at a time is allowed on the operation;
multiple requests generate a fault.last Making a request cancels any existing request. public function get concurrency():String
public function set concurrency(value:String):void
| showBusyCursor | property |
showBusyCursor:Boolean [read-write]
If true, a busy cursor is displayed while a service is executing. The default
value is false.
public function get showBusyCursor():Boolean
public function set showBusyCursor(value:Boolean):void
| XMLService | () | constructor |
public function XMLService(context:IEvaluationContext = null, rootURL:String = null, destination:String = null)Creates a new XMLService. This constructor is usually called by the generated code of an MXML document. You usually use the org.orpheus.xml.bind.XMLService class to create an XMLService in ActionScript.
Parameterscontext:IEvaluationContext (default = null) — The URL the XMLService should use when computing relative URLS.
|
|
rootURL:String (default = null) — An XMLService destination name in the service-config.xml file.
|
|
destination:String (default = null) |
| initialized | () | method |
public function initialized(document:Object, id:String):void
Called after the implementing object has been created and all
component properties specified on the MXML tag have been
initialized.
If you create this class in ActionScript and want it to function with validation, you must
call this method and pass in the MXML document and the
XMLService's id.
document:Object — The MXML document that created this object.
|
|
id:String — The identifier used by document to refer
to this object. If the object is a deep property on document,
id is null.
|
| send | () | method |
public override function send(parameters:Object = null):AsyncTokenExecutes an XMLService request. The parameters are optional, but if specified should be an ActionScript Object.
Parametersparameters:Object (default = null) |
AsyncToken — an AsyncToken. It will be the same object available in the result
or fault event's token property.
|