I have a webservice URL in which I have to pass a value having spaces
but webservice is terming it as illegal
String path = java.net.URLDecoder.decode((CommonConstants.END_POINT_URL.concat(CommonConstants.DELETE_APPOINTMENT_REASON).replace("{id}", appointmentID).replace("{reason}", reason)),"UTF-8");
WebTarget target = client.target(path);
System.out.println(target);
targets gets printed as :
JerseyWebTarget { http://abc-def/SchServices/api/appointment/51574e11-b794-e411-824b-1cc1de6ebf5a?reason=Test Appointment Reason }
Spaces between test and appointment is not permitting it to hit webservice. URL encode is also not working....because it encodes complete thing...Please suggest