Example name: Basic Flex Remoting Invocation using RemoteObject MXML
Description: The example demonstrates the following:
  • Declaration of the RemoteObject MXML tag
  • Registration of invocation result and fault handlers
  • Invocation of a remote method in a C# class
  • Response and error handling
Client-side code: Browse  Download
Server-side code: Browse  Download
Product edition availability:
  • WebORB Standard Edition (localhost clients only)
  • WebORB Professional Edition
  • WebORB Enterprise Edition
Run example:
Key points:
  • The example uses RemoteObject MXML tag to declare a reference to a remote .NET class
  • This example uses 'GenericDestination' as the destination for the RemoteObject. GenericDestination requires the 'source' attribute to contain the name of the class to invoke.
  • The example sends three primitive values as arguments for the method invocation and receives a primitive value (integer) back.
  • The client code sends arguments as String values, but the server side signatures accepts integers. WebORB performs type adaptation to convert client-side values to the corresponding formal argument types in the invoked method
  • .NET assembly with the server-side class must be deployed in a WebORB-enabled ASP.NET application. Use the 'Deployment' tab to deploy WebORB into any ASP.NET application.
Things to try:
  • Try to invoke the method with no values in the arguments
  • Try to enter a non numeric value in the text fields
  • Select division operator, enter zero for the second argument and click the button to invoke
  • Explore example's source code (click Browse or right-mouse click and select View Source)