Map metadata = new HashMap();
metadata.put("TYPE", "POST");
metadata.put("http.basic.username", username);
metadata.put("http.basic.password", password);
remotingClient.invokeOneway( "Message payload example(just a String) ", metadata );
System.out.println("Sent http post to server.");
Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
System.out.println("Response code from server: " + responseCode);