ServiceResponseAnnouncer

(This tag must be placed inside an <EventHandlers> tag)

This tag has been deprecated, please use CallBack instead.

The ServiceResponseAnnouncer tag is placed inside an EventHandlers block, so that when an object dispatches an event, and the list of handlers runs, this tag will allow you to send responses directly to the object that dispatched the event.

These responses are 3 predefined events:

  • response
  • result
  • fault

Because of those predefined events, this tag is used inside a <resultHandlers> block or <faultHandlers> block that are generated after server calls. This response will contain the server result when placed inside a resultHandlers, and the server fault when placed inside a faultHandlers. In addition, you can supply an object that will be found in the "data" property of the event or any other custom property by using the <Properties> tag.

Example:

<RemoteObjectInvoker ...>

   <!-- result handlers list gets executed when service returns with a result -->
   <resultHandlers>
      <ServiceResponseAnnouncer type="result" />
   </resultHandlers>
   
   <!-- server fault -->
   <faultHandlers>
      <ServiceResponseAnnouncer type="fault"/>
   </faultHandlers>

</RemoteObjectInvoker>

The use of this tag will have no effect if the original event was not dispatched using the Dispatcher tag. Moreover, this tag will have no effect if no ServiceResponseHandler tag was added as an inner tag to the Dispatcher tag.

See <ServiceResponseHandler> for more information.

Attributes

type

required

The type of the event to generate as the response. This type is the one that the <ServiceResponseHandler> tag will handle. response, result, or fault are valid values.

data

Any object that you wish to send in the data property of the event sent as the response that will be received by the ServiceResponseHandler tag.

Inner tags

Properties

You can add properties to the event sent as the response by using the Properties tag inside the ServiceResponseAnnouncer tag. The properties set will be dynamically added to the ResponseEvent that serves as the response.

As attributes of the Properties tag, you can specify the names of your properties and set the values of those properties by setting the value of those attributes.

<ServiceResponseAnnouncer type="result">
   
   <Properties myProperty="{resultObject.property}"/>

</ServiceResponseAnnouncer>

2 responses

  1. The first line refers to a <ListenerSequence>. Do you mean <Listener> instead?
  2. Mike,
    No, ListenerSequence is now EventHandlers. It's fixed now.

Comments now closed