But with a endpoint defined using amfphp, it the services-config file needed at all?
On Oct 9, 6:38 pm, Venkat Viswanathan <[email protected]> wrote: > Hi Shreyas, > > The destination attribute of the RemoteObject matches the destination > ID of the service declared in the services-config.xml file. > > Regards, > Venkat > > On Oct 9, 2:24 pm, Shreyas <[email protected]> wrote: > > > Hi, > > > This is the code that I have, its a simple AMFPHP example- > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > layout="vertical"> > > <mx:Script> > > <![CDATA[ > > import mx.rpc.events.FaultEvent; > > import mx.rpc.events.ResultEvent; > > import mx.controls.Alert; > > private function invokeService():void > > { > > if(txtUserName.text != null && > > txtUserName.text.length > 0) > > { > > > > rmObj.addEventListener(ResultEvent.RESULT, > > handleResponse); > > > > rmObj.addEventListener(FaultEvent.FAULT, > > handleFault); > > rmObj.greetUser(txtUserName.text); > > } > > else > > { > > txtUserName.text = "Your name"; > > txtUserName.setFocus(); > > } > > } > > > private function > > handleResponse(event:ResultEvent):void > > { > > > > rmObj.removeEventListener(ResultEvent.RESULT, > > handleResponse); > > rmObj.removeEventListener(FaultEvent.FAULT, > > handleFault); > > Alert.show(event.result.toString()); > > } > > > private function handleFault(event:FaultEvent):void > > { > > > > rmObj.removeEventListener(ResultEvent.RESULT, > > handleResponse); > > rmObj.removeEventListener(FaultEvent.FAULT, > > handleFault); > > Alert.show(event.fault.faultString); > > } > > ]]> > > </mx:Script> > > <mx:RemoteObject id="rmObj" > > endpoint="http://localhost/amfphpsamples/gateway.php" > > destination="My-First-Service" > > showBusyCursor="true" > > source="com.adobe.FirstService"/> > > <mx:HBox> > > <mx:Label text="Your name"/> > > <mx:TextInput id="txtUserName"/> > > </mx:HBox> > > <mx:Button label="Invoke" click="invokeService()"/> > > </mx:Application> > > > -- > > > What I would like to know is- What does the destination attribute of > > the RemoteObject do? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

