String soapRequest = new StringPuller().pull("/xml/soap-request.xml").replaceAll("WORK_CMD", "CMD-" + System.currentTimeMillis());
HTTPMixIn http = new HTTPMixIn();
if (userPass != null && userPass.length == 2) {
http.setRequestHeader("Authorization", "Basic " + Base64.encodeFromString(userPass[0] + ":" + userPass[1]));
}
http.initialize();
try {
String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
//LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
String soapResponse = http.postString(endpoint, soapRequest);