protected HttpMethod prepareHttpMethod(BindingOperation opBinding, String verb, Map<String, Element> partValues, Map<String, Node> headers,
final String rootUri, HttpParams params) throws UnsupportedEncodingException {
if (log.isDebugEnabled()) log.debug("Preparing http request...");
// convenience variables...
BindingInput bindingInput = opBinding.getBindingInput();
HTTPOperation httpOperation = (HTTPOperation) WsdlUtils.getOperationExtension(opBinding);
MIMEContent content = WsdlUtils.getMimeContent(bindingInput.getExtensibilityElements());
String contentType = content == null ? null : content.getType();
boolean useUrlEncoded = WsdlUtils.useUrlEncoded(bindingInput) || PostMethod.FORM_URL_ENCODED_CONTENT_TYPE.equalsIgnoreCase(contentType);
boolean useUrlReplacement = WsdlUtils.useUrlReplacement(bindingInput);
// the http method to be built and returned
HttpMethod method = null;
// the 4 elements the http method may be made of
String relativeUri = httpOperation.getLocationURI();
String queryPath = null;
RequestEntity requestEntity;
String encodedParams = null;
// ODE supports uri template in both port and operation location.