<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

    <mx:RemoteObject id="addLogic" named="addLogic"
	    fault="alert(event.fault.faultstring, 'Error')">
    </mx:RemoteObject>
	
	<AddDto id="addDto" xmlns="examples.flex.*">
		<arg1>{Number(arg1.text)}</arg1>
		<arg2>{Number(arg2.text)}</arg2>
	</AddDto>
    <mx:HBox>
	    <mx:TextInput id="arg1" width="100"/>
	    <mx:Label text="+"/>
	    <mx:TextInput id="arg2" width="100"/>
	    <mx:Label text="="/>
	    <mx:Label id="result" text="{addLogic.calculate2.result.result}"
	        width="20"/>
	    <mx:Button label="calculate2"
	        click="addLogic.calculate2(addDto)"/>
    </mx:HBox>
</mx:Application>