private void setJKSLocation(String domainPath) {
URL fileUrl = Thread.currentThread().getContextClassLoader()
.getResource(STSConfigTemplateFileName);
File file = new File(fileUrl.getFile());
if (!file.exists()) {
System.out.println("MockSTSServiceTemplate.xml not exists");
return;
}
try {
Document doc = parse(file);
XPathFactory xpfactory = XPathFactory.newInstance();
XPath path = xpfactory.newXPath();
updateElementValue(path, doc,
"/definitions/Policy/ExactlyOne/All/KeyStore", "location",
domainPath + "/config/keystore.jks");
updateElementValue(path, doc,
"/definitions/Policy/ExactlyOne/All/TrustStore",
"location", domainPath + "/config/cacerts.jks");
doc2Xml(doc);
} catch (Exception e) {
e.printStackTrace();
}
}
WebserviceSAMLSPTestSetup.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:oscm
作者:
评论列表
文章目录