santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: newbie - decryption stream using stax
Date Mon, 28 Jul 2014 18:49:59 GMT
> Question: What does the while loop above exactly do?

Is that question addressed to me? It reads from the InputStream...

https://github.com/coheigea/testcases/blob/master/apache/santuario/santuario-xml-encryption/src/test/java/org/apache/coheigea/santuario/xmlencryption/EncryptionUtils.java

Colm.


On Mon, Jul 28, 2014 at 6:47 PM, Marc Giger <giger@apache.org> wrote:

> Hi,
>
> >                 XMLStreamReader securityStreamReader =
> > inboundXMLSec.processInMessage(
> >                                 xmlStreamReader, null, eventListener);
> >
>
> ...
>
> >               while (securityStreamReader.hasNext()) {
> >                       securityStreamReader.next();
> >               }
> >
>
> Question: What does the while loop above exactly do?
>
> >
> >               Document document = StAX2DOM.readDoc(
> >                               XMLUtils.createDocumentBuilder(false),
> > securityStreamReader); return document;
> >       }
> >
>
> ...
>
> > The output is:
> > result:
> > <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>
> When you have found the answer you will see that this is the
> expected output from the above code. Also it will be
> very easy for you to change the code so that it works
> as desired/expected.
>
> Please share the solution or come back if my tip didn't help you.
>
> Thanks,
>
> Marc
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
View raw message