BZ-1085958 / BPMSPL-25 - URL/rest client logic fixes (based on java, not resteasy)