LDAPTransformer: ClassCastException with Binary fields
------------------------------------------------------

         Key: COCOON-1842
         URL: http://issues.apache.org/jira/browse/COCOON-1842
     Project: Cocoon
        Type: Bug

  Components: Blocks: Naming  
    Versions: 2.1.9    
    Reporter: Nicola Scendoni
 Attachments: LDAPTransformer.java.patch

Search operation throws a ClassCastException when ldap results contain binary 
values in attributes

For example when the ldap has an entry like:

dn: cn=name,dc=eposse,dc=it
userPassword:: e1NIQX1XNnBoNU1tNVB6OEdnaVVMYlBnekczN21qOWc9
objectClass: top
objectClass: person
sn: surname
cn: name

The search result is the following xml:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0";>
<LDAP xmlns="http://apache.org/cocoon/LDAP/1.0";>
<LDAPSET>
<userPassword>
<ELEMENT>[LDAPTransformer] Error in LDAP-Query: java.lang.ClassCastException: 
[B</ELEMENT>
</LDAPUSER>

With my patch the same search has the following form:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<LDAPUSER xmlns:ldap="http://apache.org/cocoon/LDAP/1.0";>
<LDAP xmlns="http://apache.org/cocoon/LDAP/1.0";>
<LDAPSET>
<userPassword>{Base64}e1NIQX1XNnBoNU1tNVB6OEdnaVVMYlBnekczN21qOWc9
</userPassword>
<objectClass>top</objectClass>
<objectClass>person</objectClass>
<sn>surname</sn>
<cn>name</cn>
</LDAPSET>
</LDAP>
</LDAPUSER>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira