Axway have made available under an open source (Apache 2.0) license a utility to extract public key information from an X509 certificate. The utility builds an XML KeyInfo element as defined by http://www.w3.org/2000/09/xmldsig# .
http://code.google.com/p/keyinfowriter/downloads/list
This utility is of interest to anyone involved in managing ebXML CPAs that use certificates for signing or encryption. This utility is used by the JustId open source CPA toolkit.