Class XPathUtils
java.lang.Object
es.juntadeandalucia.afirma.client.util.XPathUtils
Clase de utilidad para formatear un xml mediante XPath
- Version:
- Revision: $Rev: 17981 $
, Last modified: $Date: 2022-04-11 17:39:17 +0200 (Mon, 11 Apr 2022) $
, Modified by: $Author: miguelangel.ager $ - Author:
- Alejandro Román Máquez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VerifySignatureResponsegenerateResponse(String document, String hashDocument, String hashAlgorithm, String serverResponse, String signature, AfirmaClient.XmlSignatureMode signatureMode, boolean version6) static StringgetValuePath(String xml, String expression) Dado un xml y una expresión xpath devuelve el valor del elemento indicado
-
Field Details
-
HASH_MIME_TYPE
- See Also:
-
-
Constructor Details
-
XPathUtils
public XPathUtils()
-
-
Method Details
-
generateResponse
public static VerifySignatureResponse generateResponse(String document, String hashDocument, String hashAlgorithm, String serverResponse, String signature, AfirmaClient.XmlSignatureMode signatureMode, boolean version6) throws UnsupportedEncodingException, SAXException, IOException, XPathExpressionException, TransformerException, DOMException, TransformerFactoryConfigurationError, ParserConfigurationException, ParseException, AfirmaException, NoSuchAlgorithmException - Parameters:
serverResponse-signature-signatureMode-- Returns:
- Throws:
UnsupportedEncodingExceptionSAXExceptionIOExceptionXPathExpressionExceptionTransformerExceptionDOMExceptionTransformerFactoryConfigurationErrorParserConfigurationExceptionParseExceptionAfirmaException- En caso de errorNoSuchAlgorithmException
-
getValuePath
public static String getValuePath(String xml, String expression) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException Dado un xml y una expresión xpath devuelve el valor del elemento indicado- Parameters:
xml-expression-- Returns:
- Throws:
ParserConfigurationExceptionSAXExceptionIOExceptionXPathExpressionException
-