-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
53 lines (48 loc) · 1.9 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="utf-8"?>
<remoting:RemoteObjectProxy xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:remoting="commons.remoting.*"
xmlns:hamcrest="http://hamcrest.org/2009/mxml"
xmlns:mxml="commons.remoting.mxml.*">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.logging.ILogger;
import mx.logging.Log;
import mx.messaging.errors.ChannelError;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
public static const logger:ILogger=Log.getLogger(getQualifiedClassName(AccountService).replace("::", ""));
]]>
</fx:Script>
<mxml:Responder id="loggingResponder">
<mxml:result>
<![CDATA[
var resultEvent:ResultEvent = event as ResultEvent;
logger.info(resultEvent.result as String);
]]>
</mxml:result>
<mxml:fault>
<![CDATA[
var faultEvent:FaultEvent = event as FaultEvent;
logger.info(faultEvent.fault.faultDetail as String);
]]>
</mxml:fault>
</mxml:Responder>
<remoting:MatcherResponder id="socketConnectionErrorResponder">
<remoting:faultMatcher>
<hamcrest:HasProperty property="fault">
<hamcrest:HasProperty property="rootCause">
<hamcrest:InstanceOf type="{ChannelError}"/>
</hamcrest:HasProperty>
</hamcrest:HasProperty>
</remoting:faultMatcher>
<remoting:fault>
<![CDATA[
var faultEvent:FaultEvent = event as FaultEvent;
Alert.show(faultEvent.fault.faultDetail);
]]>
</remoting:fault>
</remoting:MatcherResponder>
</remoting:RemoteObjectProxy>