JsonRpcRequest req = null;
if (JSONRPCBinding.VERSION_20.equals(((JSONRPCBinding)endpointReference.getBinding()).getVersion())) {
req = new JsonRpc20Request(requestId, msg.getOperation().getName(), params);
} else {
req = new JsonRpc10Request(requestId, msg.getOperation().getName(), params);
}
final JsonRpcRequest json = req;
// Create content producer so that we can stream the json result out
ContentProducer cp = new ContentProducer() {