title: Mule: How Access Field in Pojo From JSON To Object
body: <p>I building Mule project who receive JSON by HTTPComponent and convet to object.
  My problem is can't acess field in object converted.</p>
  
  <p>My flux's XML  is:</p>
  
  <p><code>&lt;flow name="RestJsonHelloWorldFlow1" doc:name="RestJsonHelloWorldFlow1"&gt;&lt;http:inbound-endpointexchange-pattern="request-response" 
              host="localhost" port="8081" 
              path="credit/new"  doc:name="HTTP"
              mimeType="application/json"/&gt; &lt;response&gt;
              &lt;logger message=" #[message.payload.transactionCode]" level="INFO" doc:name="Logger"/&gt;
          &lt;/response&gt;
          &lt;json:json-to-object-transformer doc:name="JSON to Object"  returnClass="com.creditmobile.domain.Request" name="request"/&gt;&lt;/flow&gt;</code></p>
  
  <p>My pojo is:</p>
  
  <pre><code>@JsonAutoDetect
   public class Request {
  
  private Integer transactionCode;
  
  public Request() {
      super();
  }
  public Integer getTransactionCode() {
      return transactionCode;
  }
  </code></pre>
  
  <p>My JSON is:</p>
  
  <pre><code>{
   "transactionCode": 1
  }
  </code></pre>
  
  <p>I got  following exception:</p>
  
  <p><code>org.mule.api.transformer.TransformerMessagingException: The object transformed is of type: "SimpleDataType{type=java.lang.String, mimeType='*/*'}", but the expected return type is "SimpleDataType{type=org.mule.api.transport.OutputHandler, mimeType='application/json'}". The current MuleMessage is null! Please report this to dev@mule.codehaus.org
      at org.mule.transformer.AbstractMessageTransformer.checkReturnClass(AbstractMessageTransformer.java:183)
      at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:162)
      at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:73)
      + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)</code></p>
  
  <p>I saw anothers topics with same problem, but they don't have resolution and yours suggesttion doesn't work for me.</p>
  
  <p>I access field with:[message.payload.transactionCode]</p>
  
  <p>Thanks.</p>