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);
}
public static void createRegisterMessage() throws IOException {
MethodCall methodCall = new MethodCall("registerConnector", new String[]{ "example-remote", "jms-json",