private Pid tryMakePid(String uri, String checksum, String RoR) throws IOException {
        List<PidData> data = new ArrayList<PidData>();
        data.add(new PidData(Strings.PID_RECORD_KEY_URL, uri));
        if (checksum != null) {
            data.add(new PidData(Strings.PID_RECORD_KEY_CHECKSUM, checksum));
        }
        if (RoR != null) {
            data.add(new PidData(Strings.PID_RECORD_KEY_ROR, RoR));
        }

        Gson gson = new Gson();
        String sdata = gson.toJson(data);

        ClientResponse cr = wr.path(localPrefix)
                .header(Strings.HEADER_CONTENT_TYPE, MediaType.APPLICATION_JSON)
                .post(ClientResponse.class, sdata);

        if (cr.getStatus() / 100 != 2) {
            throw new IOException("error when creating PID: server returned: " + cr.getStatus());
        }
        if (cr.getLocation() == null) {
            throw new IOException("error when creating PID: location is null");
        }
        //System.out.println("pid returned: " + cr.getLocation());

        String hdl = cr.getLocation().toString();
        if (hdl.startsWith(epicServer)) {
            hdl = hdl.substring(epicServer.length());
        }
        return new PidImpl(this, hdl);
    }