ColdSpring has generated a Remote Proxy component for our UserService.
We are about to invoke that Remote Proxy as a web service by using the URL:
http://localhost:8500/beanutils/example/RemoteUserService.cfc?wsdl
and call the getUser() remote method.
Normally, calling getUser() on our RemoteUserService would return a User object, because that is what the underlying UserService returns from its getUser() method. What we have done is apply an AOP advice to the RemoteUserService's getUser() method that will convert the User object into a typed structure that could be used by a Flex application. Flex sees the typed structure as a real User object. Using this workaround, it is possible to send large numbers of objects to Flex (perhaps from a query) without incurring the overhead of creating a large number of CFC instances.
The web service call to RemoteUserService triggered the following sequence of events:
Normally, it would not be possible to dynamically configure the VOConverterAdvice to use different converter objects for different method calls. An entirely separate Advice would have to be configured in the coldspring.xml. By adding metadata, the Advice becomes far more flexible and is able to use the proper converters that may be required by different method calls. Other possible uses include specifying what variables to log for different method calls in a LoggingAdvice, or specifying security rules for different method calls in a SecurityAdvice.