This is the core implementation of the JSON callback method handler that picks up POST data from the request and uses it to call the actual callback method on the specified object and return the results back as JSON.

This processor is generic and can be used easily from anywhere that needs to feed back JSON data from a method callback, simply calling the ProcessCallbackMethod() with an object that contains methods that are marked up with the [CallbackMethod] attribute.

For example, wwCallbackHandler simply forwards all processing like this:

public void ProcessRequest(HttpContext context) { // Pass off to the worker Callback Processor ICallbackMethodProcessor processor = new JsonCallbackMethodProcessor(); // Process the inbound request and execute it on this // Http Handler's methods processor.ProcessCallbackMethodCall(this); }

This processor is expected to execute in an environment where HttpContext.Current is available and where POST data is available to describe the incoming parameter data and method to call.