Я написал следующий метод демаршаллинга для обработки моего xml-файла, но во время выполнения столкнулся со следующей ошибкой.
Следующий фрагмент - мой код:
private Response a(String text) throws ConfigurationException, SAXException {
try {
DefaultBootstrap.bootstrap(); <= ERROR HERE
}
catch(ConfigurationException e) {
log.error("Error Encountered", e);
}
Schema s = SAMLSchemaBuilder.getSAML11Schema();
BasicParserPool bpp = new BasicParserPool();
bpp.setNamespaceAware(true);
bpp.setIgnoreElementContentWhitespace(true);
bpp.setSchema(schema);
InputStream is= new ByteArrayInputStream(Base64.decode(samlContent).getBytes());
Response res= null;
try {
Document doc = bpp.parse(is);
Element elmt= doc.getDocumentElement();
try {
QName qn = new QName(elmt.getNamespaceURI(), elmt.getLocalName(), elmt.getPrefix());
Unmarshaller um = Configuration.getUnmarshallerFactory().getUnmarshaller(qn);
samlResponse = (Response) unmarshaller.unmarshall(elmt);
} catch (XMLParserException e) {
logger.debug(e.getMessage());
} catch (UnmarshallingException e) {
logger.debug(e.getMessage());
}
return res;
}
Ниже приводится сообщение об ошибке, возвращаемое в IDE:
java.lang.IllegalArgumentException: Error create SSL context
at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.init(TLSProtocolSocketFactory.java:151)
at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.<init>(TLSProtocolSocketFactory.java:111)
at org.opensaml.DefaultBootstrap.initializeHttpClient(DefaultBootstrap.java:118)
at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:110)
Я был бы очень признателен за любую форму справки. или обмен знаниями, если вы столкнулись со следующей проблемой ранее. Спасибо!