{"action":"opened","issue":{"url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/107","labels_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/107/comments","events_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/107/events","html_url":"https://github.com/jamesagnew/hapi-fhir/issues/107","id":57579458,"number":107,"title":"Proxy Authentication Required while credentials are given","user":{"login":"mharthoorn","id":5794473,"avatar_url":"https://avatars.githubusercontent.com/u/5794473?v=3","gravatar_id":"","url":"https://api.github.com/users/mharthoorn","html_url":"https://github.com/mharthoorn","followers_url":"https://api.github.com/users/mharthoorn/followers","following_url":"https://api.github.com/users/mharthoorn/following{/other_user}","gists_url":"https://api.github.com/users/mharthoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/mharthoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mharthoorn/subscriptions","organizations_url":"https://api.github.com/users/mharthoorn/orgs","repos_url":"https://api.github.com/users/mharthoorn/repos","events_url":"https://api.github.com/users/mharthoorn/events{/privacy}","received_events_url":"https://api.github.com/users/mharthoorn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-13T09:55:33Z","updated_at":"2015-02-13T09:55:33Z","closed_at":null,"body":"Error found during connectathon Helsinki by one of the participants.\r\n\r\nError message: \r\n```java\r\nException in thread \"main\" ca.uhn.fhir.rest.server.exceptions.UnclassifiedServerFailureException: HTTP 407 Proxy Authentication Required \r\n            at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:263) \r\n            at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:235) \r\n            at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:130) \r\n            at ca.uhn.fhir.rest.client.GenericClient.read(GenericClient.java:250) \r\n            at fi.kela.fhir.FhirClient.main(FhirClient.java:53) \r\n```  \r\nSource code: \r\n```java\r\nfinal String authUser = \"username\"; \r\nfinal String authPassword = \"password\"; \r\nCredentialsProvider credsProvider = new BasicCredentialsProvider(); \r\ncredsProvider.setCredentials(new AuthScope(\"10.10.10.10\", 8080), \r\n            new UsernamePasswordCredentials(authUser, authPassword)); \r\nHttpHost myProxy = new HttpHost(\"10.10.10.10\", 8080); \r\nHttpClientBuilder clientBuilder = HttpClientBuilder.create(); \r\n  \r\nclientBuilder.setProxy(myProxy) \r\n.setDefaultCredentialsProvider(credsProvider) \r\n            .disableCookieManagement(); \r\n                         \r\nCloseableHttpClient httpClient = clientBuilder.build(); \r\n                         \r\nFhirContext ctx = new FhirContext(); \r\nString serverBase = \"http://spark.furore.com/fhir/\"; \r\nctx.getRestfulClientFactory().setHttpClient(httpClient); \r\nIGenericClient client = ctx.newRestfulGenericClient(serverBase); \r\n  \r\nIdDt id = new IdDt(\"Patient\", \"123\"); \r\nclient.read(Patient.class, id); \r\n```"}}