Question: In the middle of a Mule flow (inside a Class that extends the AbstractTransformer) I need to print (for logging purposes)
as much as possible from the original message (the actual XML that was send trough SOAPUI to MULE)

In order to know how to get the message I'm trying to get the message out of RequestContext.getEvent()
but I haven't been able to find it,
does anyone knows how to do this?

for now I'm trying to find what I need via a deprecated method:

```
RequestContext.getEvent().getMessage().getPayload()

```

But this is not what I need, and this:

```
RequestContext.getEvent().getMessage().getPayloadAsString()

```

doesn't return anything.

Answer: 
No, there's nothing within Java which allows this. Yes, it would be nice - but it's not present at the moment.

The closest we have is the promise of method literals in Java 8, in the general lambda expression feature, but as far as I'm aware this won't apply to fields.
I think you are missing the point of reflection.

From the [Oracle Trail](http://docs.oracle.com/javase/tutorial/reflect/):

> 
> Reflection is commonly used by programs which require the ability to examine or modify the runtime behavior of applications running in the Java virtual machine. ...
> 
> 
> 

Reflection allows the application to examine itself during **runtime**. So a compile time check is not what you get when using reflection.

Though, you can check a fields existence in your code at runtime, before accessing it.