Q:

How to set JSON payload values to a POJO in Mule

I have the following JSON payload
[
    {
        "name": "Car Sale",
        "id": 1,
        "status": "processing"
    },
    {
        "name": "Car Sale",
        "id": 2,
        "status": "processing"
    }
]

How can I set the payload values to a Java component 
public class ClientDetailRequest {
    private String name;
    private Long id;
    private String status;
}

I would like to use the POJO as a web service and send the pojo via soap

A:

Define an inbound endpoint

<http:http:inbound-endpoint exchange-pattern="request-response" host="xxx.xxx.xxx.xxx" port="8080" path="path/to/service" doc:name="HTTP" contentType="application/json"/>

Get the payload from muleContext and then
a. Either use mule's inbuilt object-to-json-transformer to covert JSON to POJO

<json:json-to-object-transformer returnClass="xxxx.xxxx. ClientDetailRequest"/>
b. Or user custom transformer (only if above option does not work)

Oh just realized that you want to handle array on objects.  In this case you you should get json and transform it to a Map. 
<json:json-to-object-transformer returnClass="java.util. HashMap" />
And then query it using MEL like standard MVEL or Java syntax
<logger message="#[payload. ClientDetailRequest[0]]" level="INFO" />
Now various ways to handle this - Do look at MVL expressions or groovy or use plain Java code..

