Problemas ao assinar um xml spring boot?

boa tarde

amigos estou com dificuldades em resolver um problema na classe em java abaixo, já pesquisei mas estou quebrando cabeça, sem alguém puder me ajudar agradeço.

nesta linha abaixo preciso adicionar ID nas entre aspas fac.newReference(“” mas da erro não aceita nenhum valor.

por exemplo:

String id = “#999999999999999”;

Cannot resolve element with ID ID999999999999999

Reference ref = fac.newReference(“”, fac.newDigestMethod(DigestMethod.SHA256, null),transforms, null,null);

erro

public void geraAssinatura() {
	
	try { 
		
		XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");

		List<Transform> transforms = new ArrayList<Transform>();
		transforms.add(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null));
		transforms.add(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null));
	  	 
		Reference ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA256, null),transforms, null,null); 
		
		SignedInfo si = fac.newSignedInfo(
				fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null),
				fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null),
				Collections.singletonList(ref));
		 

		KeyStore ks = KeyStore.getInstance("PKCS12");
		ks.load(new FileInputStream("/DISCOS/teste.pfx"), "99999".toCharArray());

		String alias = ks.aliases().nextElement();

		KeyStore.PrivateKeyEntry keyEntry = (KeyStore.PrivateKeyEntry) 
			  ks.getEntry(alias,new KeyStore.PasswordProtection("999999".toCharArray()));
		 
		X509Certificate cert = (X509Certificate) keyEntry.getCertificate();
 		
		KeyInfoFactory kif = fac.getKeyInfoFactory();
		
		List x509Content = new ArrayList();
		x509Content.add(cert.getSubjectX500Principal().getName());
		x509Content.add(cert);
		X509Data xd = kif.newX509Data(x509Content);

		KeyInfo ki = kif.newKeyInfo(Collections.singletonList(xd));

		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		dbf.setNamespaceAware(true);

		Document doc = dbf.newDocumentBuilder().parse(new FileInputStream("/DISCOS/enventR1000.XML"));
		doc.setXmlStandalone(true);
	 	 
		DOMSignContext dsc = new DOMSignContext(keyEntry.getPrivateKey(), doc.getDocumentElement());		 	 
		XMLSignature signature = fac.newXMLSignature(si, ki);
	
		signature.sign(dsc);
	
		OutputStream os = new FileOutputStream("/DISCOS/enventR1000_assinado.XML");
		
		TransformerFactory tf = TransformerFactory.newInstance();
		Transformer trans = tf.newTransformer();
		trans.setOutputProperty(OutputKeys.INDENT, "yes");
		trans.transform(new DOMSource(doc), new StreamResult(os));

		NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
		if (nl.getLength() == 0) {
			throw new Exception("Assinatura não encontrada");
		}

		DOMValidateContext valContext = new DOMValidateContext(new X509KeySelector(ks), nl.item(0));

		XMLSignature signature2 = fac.unmarshalXMLSignature(valContext);

		boolean coreValidity = signature2.validate(valContext);

		if (coreValidity) {
			System.out.println("Assinatura Válida!");
			os.close();
		} else {
			System.out.println("Assinatura inválida!");
		}

	} catch (Exception ex) {
		// TODO: handle exception
		ex.printStackTrace();
	}
}

}