i need to digital sign my XML messages in JAVA: The resulting XML signature should have the following format:
You got
, because that's what you asked for: fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null)
.
As you figured out and https://blogs.oracle.com/mullan/entry/using_stronger_xml_signature_algorithms states, fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", (SignatureMethodParameterSpec) null)
will get you
.