* username,password,configFile) variant, where configFile can be null if you're
* not using certificates.
*/
System.out.println("Sending HTTPS PUT to update customer name");
WebClient wc = WebClient.create(BASE_SERVICE_URL, CLIENT_CONFIG_FILE);
Customer customer = new Customer();
customer.setId(123);
customer.setName("Mary");
Response resp = wc.put(customer);
/*
* Send HTTP POST request to add customer, using JAXRSClientProxy
* Note: if need to use basic authentication, use the JAXRSClientFactory.create(baseAddress,
* username,password,configFile) variant, where configFile can be null if you're
* not using certificates.
*/
System.out.println("\n");
System.out.println("Sending HTTPS POST request to add customer");
CustomerService proxy = JAXRSClientFactory.create(BASE_SERVICE_URL, CustomerService.class,
CLIENT_CONFIG_FILE);
customer = new Customer();
customer.setName("Jack");
resp = wc.post(customer);
System.out.println("\n");
System.exit(0);
}