JavaEE: How to access data field of a JSON request send by Flex client
 I got the following JAX-RS service.

    @Path("config")
    public class ConfigurationResponder {
        
        @POST
        @Produces({"application/json"})
        @Consumes({"application/json"})
        public SomeResponse handleMessage() {
    
            SomeResponse response = new SomeResponse();
            // calculations...
            return response;
        }
    }

I build some request in a Flex client.

    var message:Object = {};
    message.type = "get_configuration";
    message.data = "some data";
    
    var request:URLRequest = new URLRequest(fullUrl);
    request.contentRype = "application/json";
    request.data = message;
    request.method = URLRequestMethod.POST;
    
    var loader:URLLoader = ...
    loader.load(request);

The JavaEE web service receives the request and respond successfully with some dummy response, but I got no access to the `request.data` field.

**Problem**: How seemlessly to access the data of the request message (which is `{"type":"get_configuration","data":"some data"}` in this particular example)? I think that I'm supposed to add some parameters to the `handleMessage` method like 

    public SomeResponse handleMessage(Object message) {...


but this does not work at all(the request got something like 415 response)



JavaEE: How to access data field of a JSON request send by Flex client
===

 I got the following JAX-RS service.

    @Path("config")
    public class ConfigurationResponder {
        
        @POST
        @Produces({"application/json"})
        @Consumes({"application/json"})
        public SomeResponse handleMessage() {
    
            SomeResponse response = new SomeResponse();
            // calculations...
            return response;
        }
    }

I build some request in a Flex client.

    var message:Object = {};
    message.type = "get_configuration";
    message.data = "some data";
    
    var request:URLRequest = new URLRequest(fullUrl);
    request.contentRype = "application/json";
    request.data = message;
    request.method = URLRequestMethod.POST;
    
    var loader:URLLoader = ...
    loader.load(request);

The JavaEE web service receives the request and respond successfully with some dummy response, but I got no access to the `request.data` field.

**Problem**: How seemlessly to access the data of the request message (which is `{"type":"get_configuration","data":"some data"}` in this particular example)? I think that I'm supposed to add some parameters to the `handleMessage` method like 

    public SomeResponse handleMessage(Object message) {...


but this does not work at all(the request got something like 415 response)


