private void sign(KeyStore keyStore, KeyPair keyPair, String alias, Document document, List<EbMSDataSource> dataSources) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException, KeyException, MarshalException, XMLSignatureException, KeyStoreException
{
//XMLSignatureFactory signFactory = XMLSignatureFactory.getInstance("DOM");
XMLSignatureFactory signFactory = XMLSignatureFactory.getInstance();
DigestMethod sha1DigestMethod = signFactory.newDigestMethod(DigestMethod.SHA1,null);
List<Transform> transforms = new ArrayList<Transform>();
transforms.add(signFactory.newTransform(Transform.ENVELOPED,(TransformParameterSpec)null));
Map<String,String> m = new HashMap<String,String>();
m.put("soap","http://schemas.xmlsoap.org/soap/envelope/");