cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@admiraalkruys.nl>
Subject Re: eldap (Base64 problem fixed)
Date Tue, 06 May 2003 18:12:00 GMT
Base64.encode() returns a String instead of a byte[].
So changing the lines to val = Base64.encode(bArr); fixed it.

Alexander

Ps. I will try to create some HowTo for this if people want it.

On Tue, 2003-05-06 at 19:50, Alexander Broekhuis wrote:
> I have something working, but had to hack the eldap.xsl file.
> 
> Some things that I don't understand:
> Are an user and his password supposed to be in the xml file? I had to
> change the logic sheet to get it working.
> 
> Base64 encoding doesn't work. I had to change the import from
> org.apache.xerces.utils.Base64 to org.apache.xerces.impl.dv.util.Base64,
> but it still doesn't work.
> I get this error:
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> eldapbasicsample_xml:
> Line 545, column -1:  incompatible types
> Line 0, column 0: 
> 1 error
> 
> 	at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:360)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
> 
> This is the code:
> while( vals.hasMoreElements() ) // Line
> {
> Object valObj = vals.nextElement();
> String val = "";
> try
> {
> val = (String)valObj;
> }
> catch (ClassCastException e)
> {
> // it's an array of a primitive type, like byte[]
> byte[] bArr = (byte[])valObj;
> //This line gives the error.
> byte[] bEncArr = Base64.encode(bArr); // This is line 545
> val = new String(bEncArr);
> CurrentAttribute.IsBase64 =true; 
> }
> 
> Someone know what is wrong?
> 
> Alexander
> 
> On Tue, 2003-05-06 at 01:50, Rod Giffin wrote:
> > [Sent off list]
> > 
> > On Mon, 2003-05-05 at 15:20, Alexander Broekhuis wrote:
> > > Thx for the hint.
> > > 
> > > The 2 characters after the = are a hex value.
> > > So:
> > >  =3D becomes =
> > >  =09 becomes <tab>
> > >  =20 becomes <space>
> > >  =0A becomes <enter>
> > > And every = that shouldn't be in the file is a line wrap tag.
> > > 
> > > But what do I do next? I changed the file, but when I want to view the
> > > output I only see the original xml(with the ldap tags and query).
> > 
> > Well, actually I don't know yet.  I looked at this 2 or 3 months ago
> > because I was contemplating using LDAP for identifying users for a
> > national association's membership management system.  The only problem
> > is, they haven't deployed an ldap server, so I ended up dropping the
> > idea before it held up my end of the project, and now I'm using a simple
> > SQL query to a simple user table in SQL.  It's not as flexible, but it
> > works for my purposes at the moment.
> > 
> > Rod.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message