MethodCall methodCall = new MethodCall("delete", new Object[]{ connectorId });
Map<String, String> metaData = new HashMap<String, String>();
metaData.put("serviceId", "connectorManager");
methodCall.setMetaData(metaData);
MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
BeanDescription auth = BeanDescription.fromObject(new Password("password"));
methodCallRequest.setPrincipal("admin");
methodCallRequest.setCredentials(auth);
ObjectMapper mapper = new ObjectMapper();
String writeValueAsString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
System.out.println(writeValueAsString);