public int createUserProfileJson(String payload) {

		DefaultHttpClient httpClient = new DefaultHttpClient();
		int output = 0;
		try {

			HttpPost httpPostRequest = new HttpPost("http://localhost:2021/mule-esb/rest/createuserprofile");
			httpPostRequest.addHeader("accept", "application/json");

			StringEntity body = new StringEntity(payload);
			body.setContentType("application/json");
			httpPostRequest.setEntity(body);

			HttpResponse response = httpClient.execute(httpPostRequest);
			String rawOutput = IOUtils.toString(response.getEntity().getContent());
			logger.debug("Raw Output from REST Servie: " + rawOutput);
			
			
			output = Integer.valueOf(rawOutput);

			logger.debug("int Output from REST Servie: " + output);

		} catch (Exception e) {
			logger.debug("Exception received while connecting to rest service: ", e);
		} finally {
			if (httpClient != null && httpClient.getConnectionManager() != null) {
				httpClient.getConnectionManager().shutdown();
			}
		}
		return output;
	}