Fixed formatting
This commit is contained in:
parent
87738d0117
commit
ab02a783c9
@ -39,7 +39,6 @@ public class EnvoyClient {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public EnvoyClient() {
|
||||
@ -73,11 +72,12 @@ public class EnvoyClient {
|
||||
}
|
||||
|
||||
// Send message
|
||||
String url = String.format("%s:%s/envoy-server/rest/message/send", serverProps.getProperty("server"),
|
||||
String url = String.format("%s:%s/envoy-server/rest/message/send",
|
||||
serverProps.getProperty("server"),
|
||||
serverProps.getProperty("port"));
|
||||
Client client = ClientBuilder.newClient();
|
||||
WebTarget target = client.target(url);
|
||||
Response response = target.request().post(Entity.entity(message, "application/xml"));
|
||||
Client client = ClientBuilder.newClient();
|
||||
WebTarget target = client.target(url);
|
||||
Response response = target.request().post(Entity.entity(message, "application/xml"));
|
||||
System.out.println("Response code: " + response.getStatus());
|
||||
response.close();
|
||||
client.close();
|
||||
@ -93,8 +93,8 @@ public class EnvoyClient {
|
||||
* @return Prepared {@link Message} object
|
||||
*/
|
||||
public Message createMessage(String senderID, String recipientID, String textContent) {
|
||||
ObjectFactory factory = new ObjectFactory();
|
||||
Message.MetaData metaData = factory.createMessageMetaData();
|
||||
ObjectFactory factory = new ObjectFactory();
|
||||
Message.MetaData metaData = factory.createMessageMetaData();
|
||||
metaData.setSender(senderID);
|
||||
metaData.setRecipient(recipientID);
|
||||
metaData.setState(false);
|
||||
|
Reference in New Issue
Block a user