Proposed patch: to add a constructor to initialize the string and add the string initialiaztion to the main method also:
public Main() {
LocalAuthority localAuthority = new LocalAuthority();
URI serviceURI = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());
SERVICE_ID = serviceURI.toString();
}
/**
* Main class for accessing CDP
*
* @param args
*/
public static void main(String[] args)
{
LocalAuthority localAuthority = new LocalAuthority();
URI serviceURI = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());
SERVICE_ID = serviceURI.toString();
//public static final URI CRED_SERVICE_ID = URI.create("ivo://cadc.nrc.ca/cred");
public static URI CRED_SERVICE_ID;
protected int expiring;
protected String userid;
public AbstractCertGenAction() {
LocalAuthority localAuthority = new LocalAuthority();
CRED_SERVICE_ID = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());
}
public boolean init(final ArgumentMap argMap) throws IOException
{
LocalAuthority localAuthority = new LocalAuthority();
CRED_SERVICE_ID = localAuthority.getServiceURI(Standards.CRED_DELEGATE_10.toString());