Packagecom.asfusion.mate.actions.builders
Classpublic class HTTPServiceInvoker
InheritanceHTTPServiceInvoker Inheritance ServiceInvoker Inheritance AbstractServiceInvoker Inheritance BaseAction Inheritance AbstractAction
ImplementsIAction

The HTTPServiceInvoker tag is used to create an HTTP Service instance and make a GET or POST request to that service. To use this tag, you need to specify the same attributes you would when creating an HTTP service with the 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



Public Properties
 PropertyDefined by
 InheritedchannelSet : ChannelSet
Provides access to the ChannelSet used by the service.
ServiceInvoker
  contentType : String
Type of content for service requests.
HTTPServiceInvoker
 Inheriteddebug : Boolean
Whether to show debugging information for its inner-handlerss.
AbstractServiceInvoker
 Inheriteddestination : String
The destination of the service.
ServiceInvoker
 InheritedfaultHandlers : 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
 InheritedmakeObjectsBindable : Boolean
When this value is true, anonymous objects returned are forced to bindable objects.
ServiceInvoker
  method : Object
HTTP method for sending the request.
HTTPServiceInvoker
 Inheritedpassword : Object
Password to supply to setCredentials method
ServiceInvoker
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
 InheritedremotePassword : Object
Password to supply to setCredentials method
ServiceInvoker
 InheritedremoteUsername : Object
Username to supply to setCredentials method
ServiceInvoker
  request : Object
Object of name-value pairs used as parameters to the URL.
HTTPServiceInvoker
 InheritedrequestTimeout : 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
 InheritedresultHandlers : 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
 Inheritedusername : Object
Username to supply to setCredentials method
ServiceInvoker
Protected Properties
 PropertyDefined by
 InheritedautoUnregistration : Boolean = true
When auto unregistration is true, all inner handlers will be unregistered after the first inner handlers fires.
AbstractServiceInvoker
 InheritedcurrentIndex : int = 0
Index used to store groups of inner handlers.
AbstractServiceInvoker
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
 InheritedinnerHandlersClass : Class
Class that is used as a template to create the inner-handlers
AbstractServiceInvoker
 InheritedinnerHandlersDispatcher : IEventDispatcher
Dispatcher that will trigger the inner-handlers execution by dispatching events (ie: ResultEvent or FaultEvent).
AbstractServiceInvoker
 InheritedinnerHandlersList : Array
Inner handlers list that stores all inner handlers indexed by the currentIndex.
AbstractServiceInvoker
 Inheritedtoken : AsyncToken
Generated when making asynchronous RPC operations.
ServiceInvoker
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
Handler that will be fired when the first of the innerHandlers starts executing.
AbstractServiceInvoker
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
ServiceInvoker
 Inherited
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
  
prepare(scope:IScope):void
The first method that trigger calls.
HTTPServiceInvoker
  
run(scope:IScope):void
Where all the action occurs.
HTTPServiceInvoker
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Property detail
contentTypeproperty
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.

Implementation
    public function get contentType():String
    public function set contentType(value:String):void
headersproperty 
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
instanceproperty 
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.

Implementation
    public function get instance():HTTPService
    public function set instance(value:HTTPService):void
methodproperty 
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
requestproperty 
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.

Implementation
    public function get request():Object
    public function set request(value:Object):void
resultFormatproperty 
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:

Implementation
    public function get resultFormat():String
    public function set resultFormat(value:String):void
rootURLproperty 
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.

Implementation
    public function get rootURL():String
    public function set rootURL(value:String):void
urlproperty 
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.

Implementation
    public function get url():Object
    public function set url(value:Object):void
useProxyproperty 
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.

Implementation
    public function get useProxy():Boolean
    public function set useProxy(value:Boolean):void
Method detail
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.

Parameters
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.

Parameters
scope:IScope