Package | com.asfusion.mate.actions.builders |
Class | public class HTTPServiceInvoker |
Inheritance | HTTPServiceInvoker ServiceInvoker AbstractServiceInvoker BaseAction AbstractAction |
Implements | IAction |
HTTPService
tag (with the exception of
xmlDecode, xmlEncode, and lastResult).
This tag will also accept all mx.rpc.http.HTTPService tag attributes.
Default MXML PropertyMXMLrequest
Property | Defined by | ||
---|---|---|---|
channelSet : ChannelSet
Provides access to the ChannelSet used by the service.
| ServiceInvoker | ||
contentType : String
Type of content for service requests.
| HTTPServiceInvoker | ||
debug : Boolean
Whether to show debugging information for its inner-handlerss.
| AbstractServiceInvoker | ||
destination : String
The destination of the service.
| ServiceInvoker | ||
faultHandlers : Array
A set of inner-handlers to run when the server call returns a fault.
| AbstractServiceInvoker | ||
headers : Object
Custom HTTP headers to be sent to the third party endpoint.
| HTTPServiceInvoker | ||
instance : HTTPService
If this property is null, a new HTTPService instance is created on
the
prepare method. | HTTPServiceInvoker | ||
makeObjectsBindable : Boolean
When this value is true, anonymous objects returned are forced to bindable objects.
| ServiceInvoker | ||
method : Object
HTTP method for sending the request.
| HTTPServiceInvoker | ||
password : Object
Password to supply to
setCredentials method
| ServiceInvoker | ||
properties : ArrayProperties allows you to add properties to the currentInstance . | BaseAction | ||
remotePassword : Object
Password to supply to
setCredentials method
| ServiceInvoker | ||
remoteUsername : Object
Username to supply to
setCredentials method
| ServiceInvoker | ||
request : Object
Object of name-value pairs used as parameters to the URL.
| HTTPServiceInvoker | ||
requestTimeout : int
Provides access to the request timeout in seconds for sent messages.
| ServiceInvoker | ||
resultFormat : String
Value that indicates how you want to deserialize the result returned by the HTTP call.
| HTTPServiceInvoker | ||
resultHandlers : Array
A set of inner-handlers to run when the server call returns a result.
| AbstractServiceInvoker | ||
rootURL : String
The URL that the HTTPService object should use when computing relative URLs.
| HTTPServiceInvoker | ||
url : Object
Location of the service.
| HTTPServiceInvoker | ||
useProxy : Boolean
Specifies whether to use the Flex proxy service.
| HTTPServiceInvoker | ||
username : Object
Username to supply to
setCredentials method
| ServiceInvoker |
Method | Defined by | ||
---|---|---|---|
actionListStartHandler(event:ActionListEvent):void
Handler that will be fired when the first of the innerHandlers starts executing.
| AbstractServiceInvoker | ||
The last method that
trigger calls. | ServiceInvoker | ||
createInnerHandlers(scope:IScope, innerType:String, actionList:Array, innerHandlersClass:Class = null):IActionList
Creates IActionList and sets the properties:
debug, type, listeners, dispatcher and inheritScope in the newly IActionList (inner-handlers).
| AbstractServiceInvoker | ||
The first method that
trigger calls. | HTTPServiceInvoker | ||
Where all the action occurs.
| HTTPServiceInvoker | ||
setProperties(scope:IScope):void
Where all the properties are set into the
currentInstance . | BaseAction |
contentType | property |
contentType:String
[read-write]
Type of content for service requests. The default is application/x-www-form-urlencoded
which sends requests like a normal HTTP POST with name-value pairs.
application/xml
send requests as XML.
public function get contentType():String
public function set contentType(value:String):void
headers | property |
headers:Object
[read-write]Custom HTTP headers to be sent to the third party endpoint. If multiple headers need to be sent with the same name the value should be specified as an Array.
Implementation public function get headers():Object
public function set headers(value:Object):void
instance | property |
instance:HTTPService
[read-write]
If this property is null, a new HTTPService instance is created on
the prepare
method. Otherwise, this instance will be used.
The class that will be used to create the instance if none is provided is
mx.rpc.http.HTTPService
.
The default value is null
.
public function get instance():HTTPService
public function set instance(value:HTTPService):void
method | property |
method:Object
[read-write]HTTP method for sending the request. Permitted values are GET, POST, HEAD, OPTIONS, PUT, TRACE and DELETE. Lowercase letters are converted to uppercase letters. The default value is GET.
Implementation public function get method():Object
public function set method(value:Object):void
request | property |
request:Object
[read-write]
Object of name-value pairs used as parameters to the URL. If the contentType
property is set to application/xml
,
it should be an XML document.
the request object can include smartObjects
from the EventMap
such as:
event, lastResult, currentEvent, resultObject, fault, message, data etc.
public function get request():Object
public function set request(value:Object):void
resultFormat | property |
resultFormat:String
[read-write]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 default value is object
. The following values are permitted:
object
The value returned is XML and is parsed as a tree of ActionScript objects. This is the default.array
The value returned is XML and is parsed as a tree of ActionScript objects however if the top level object is not an Array,
a new Array is created and the result set as the first item. If makeObjectsBindable is true then the Array will be wrapped in an ArrayCollection.xml
The value returned is XML and is returned as literal XML in an ActionScript XMLnode object.flashvars
The value returned is text containing name=value pairs separated by ampersands, which is parsed into an ActionScript object.text
The value returned is text, and is left raw.e4x
The value returned is XML and is returned as literal XML in an ActionScript XML object, which can be accessed using ECMAScript for XML (E4X) expressions. public function get resultFormat():String
public function set resultFormat(value:String):void
rootURL | property |
rootURL:String
[read-write]
The URL that the HTTPService object should use when computing relative URLs.
This property is only used when going through the proxy.
When the useProxy
property is set to false
, the relative URL is
computed automatically
based on the location of the SWF running this application. If not set explicitly rootURL
is automatically set to the URL of mx.messaging.config.LoaderConfig.url.
public function get rootURL():String
public function set rootURL(value:String):void
url | property |
url:Object
[read-write]
Location of the service. If you specify the url
and a non-default destination, your destination in the services-config.xml file must allow the specified URL.
public function get url():Object
public function set url(value:Object):void
useProxy | property |
useProxy:Boolean
[read-write]
Specifies whether to use the Flex proxy service. The default value is false
. If you do not specify true to proxy
requests though the Flex server, you must ensure that the player can reach the target URL.
You also cannot use destinations defined in the services-config.xml file if the useProxy
property is set to false
.
public function get useProxy():Boolean
public function set useProxy(value:Boolean):void
prepare | () | method |
protected override function prepare(scope:IScope):void
The first method that trigger
calls.
Usually, this is where the currentInstance
is created or set if needed.
In this method you can also perform any code that must be done first.
scope:IScope |
run | () | method |
protected override function run(scope:IScope):void
Where all the action occurs. At this moment, the currentInstance
is already instantiated and all the properties are already set.
scope:IScope |