Java, Semeru Runtimes and Runtimes for Business

Java, Semeru Runtimes and Runtimes for Business

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  XML SIGN USING JAVA

    Posted Mon December 16, 2024 09:38 AM

    Hi 

    I am try to sing an XML file using  apache libriries but when I use 

    class org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI

    IBMi WAS return 

    org.apache.jcp.xml.dsig.internal.dom.DOMReference incompatible with com.ibm.xml.crypto.dsig.dom.ReferenceImpl

    Are there anyway to use  the java sign providers?

    Sign Code

                Provider provider = Security.getProvider("XMLDSig");
                Class<?> classProvider = null;
                classProvider = Class.forName("org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"); //$NON-NLS-1$
            if ( provider == null || !classProvider.isInstance(provider)) {
                  System.out.println("Class Provider: " + classProvider.toString());
                }
                    



    ------------------------------
    Jose Luis Nebril
    ------------------------------