How to login with Java API through a proxy ?

Hi,

i’m trying to login to a BPM server with a java client and Java API (Bonita 6.3.8) like this :

final Map<String, String> map = new HashMap<>(); map.put("server.url", BPM_URI); map.put("application.name", ""); APITypeManager.setAPITypeAndParams(ApiAccessType.HTTP, map); LoginAPI loginAPI = TenantAPIAccessor.getLoginAPI(); APISession session = loginAPI.login("user", "xxxxx");

It works well when BPM is directly accessible via HTTP.
But when BPM server is behind a proxy, we’ve got an error :

Caused by: java.net.SocketException: Connection reset
	  at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:143)

Is it possible to login with JavaAPI through a HTTP proxy ?

We have successfully login to the same server with REST API (with a custom HTTP client) but i don’t know how to configure Java API to use a proxy.

Any help would be greatly appreciated.

Regards

i didnt see any parameter to configure a proxy in Engine API so i ended up creating custom TenantAPIAccessor & HTTPServerAPI classes to use my own HTTP client.