throw new IllegalArgumentException("WebConnectionParameters must be specified");
}
final URL jcUrl = new URL(connParams.getServerUrl());
final String jcBasePath = jcUrl.getPath();
final WebserviceHttpClient hc ;
if(null==formData || formData.size()<1){
hc= WebserviceHttpClientFactory.getInstance().getWebserviceHttpClient(jcUrl
+ urlPath,
jcBasePath,
connParams.getUsername(),
connParams.getPassword(),
queryParams,
uploadFile,
uploadFileParam,null,expectedContentType);
}else{
hc = WebserviceHttpClientFactory.getInstance().getWebserviceHttpClient(jcUrl
+ urlPath,
jcBasePath,
connParams.getUsername(),
connParams.getPassword(),
queryParams,
formData);
}
if (null != method) {
hc.setMethodType(method);
}
try {
hc.makeRequest();
} catch (IOException e) {
throw new CoreException("Error making server request to " + jcUrl + ": " + e.getMessage(), e);
} catch (HttpClientException e) {
throw new CoreException("Error making server request to " + jcUrl + ": " + e.getMessage(), e);
}