Fixed formatting

This commit is contained in:
Kai S. K. Engelbart 2019-10-06 10:41:32 +02:00
parent 87738d0117
commit ab02a783c9

View File

@ -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);