You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by David Garcia <da...@partners.netfocus.es> on 2005/09/08 16:10:06 UTC

org.apache.xml.security.keys.content.RetrievalMethod.getTransforms method issue

Hi,
 
Working with the method getTransforms from the RetrievalMethod object I
found that to retrieve the Transforms node  the code is the following:
 
/**
    * Method getTransforms
    *
    *
    * @throws XMLSecurityException
    * @return
    */
   public Transforms getTransforms() throws XMLSecurityException {
 
      try {
 
       Element transformsElem
=XMLUtils.selectDsNode(this._constructionElement,Constants._TAG_TRANSFOR
MS, 0); 
      
            // this method always returns null!!!! because the
contructionElement is not a transforms it's a RetrievalMethod Node
instead of this the code should be
            // Element transformsElem
=XMLUtils.selectDsNode(this._constructionElement,Constants._TAG_TRANSFOR
MS, 0); 
       
       Element transformsElem
=XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),Constan
ts._TAG_TRANSFORMS, 0);
            //here the first child, if exists must be a transforms node
 
 
            ..
 
If this bug has already been solved simple ignore this mail ;P ;)
 
Regards
 
Dave Garcia