Creating folder using owncloud API

I am trying to create a folder using owncloud API in java and I get "pkix path building failed sun.security.provider.certpath.suncertpathbuilderexception" because I guess org.apache.commons httpClient cannot trust this server. I tried to solve this by registering self signed certificate to CloseableHttpClient. But I guess CloseableHttpClient does not support jackrabbit MKCOL. Any suggestions on how I can solve this?

Please consult the api documentation of the library/tool you are using. We cannot help in here with Java questions. Sorry this is out of scope