@Override
public FormItemRepresentation getFormItem(String pkgName, String formItemId) throws FormServiceException {
HttpClient client = helper.getHttpClient();
if (formItemId != null && !"".equals(formItemId)) {
GetMethod method = null;
FormRepresentationDecoder decoder = FormEncodingFactory.getDecoder();
try {
String getUrl = helper.getApiSearchUrl(pkgName) +
URLEncoder.encode(formItemId, GuvnorHelper.ENCODING) + ".json";
method = helper.createGetMethod(getUrl);
helper.setAuth(client, method);
client.executeMethod(method);
String json = method.getResponseBodyAsString();
return decoder.decodeItem(json);
} catch (IOException e) {
throw new FormServiceException(e);
} catch (FormEncodingException e) {
throw new FormServiceException(e);
} finally {