You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Davanum Srinivas <da...@gmail.com> on 2006/11/02 20:07:37 UTC

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Sean,

We have a showstopper in Axis2/WSS4J land. This is the only way to fix
the problem. I spent a lot of time into doing the least change.
Details are here:

http://issues.apache.org/jira/browse/AXIS2-1570

We need to be able to influence which DBF is picked up or we can't
ship our code :(

-- dims

On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> Hi Dims,
>
> Test or doc changes are fine, but I really don't think we should be
> making any code changes (especially RFEs) unless they are showstoppers
> until we ship 1.4 ...
>
> I have a bunch of stuff I want to fix but have been waiting until we get
> 1.4 out the door ...
>
> --Sean
>
> dims@apache.org wrote:
> > Author: dims
> > Date: Thu Nov  2 08:27:30 2006
> > New Revision: 470407
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> > Log:
> > Allow folks to extend XMLCipher to override the parseFragment method if they want to say cache the DBF in their own code
> >
> > Modified:
> >     xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> >
> > Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> > ==============================================================================
> > --- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
> > +++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Nov  2 08:27:30 2006
> > @@ -1939,14 +1939,7 @@
> >                       String fragment = sb.toString();
> >
> >              try {
> > -                DocumentBuilderFactory dbf =
> > -                    DocumentBuilderFactory.newInstance();
> > -                             dbf.setNamespaceAware(true);
> > -                             dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > -                             DocumentBuilder db = dbf.newDocumentBuilder();
> > -                             Document d = db.parse(
> > -                                 new InputSource(new StringReader(fragment)));
> > -
> > +                Document d = parseFragment(fragment);
> >                               Element fragElt = (Element) _contextDocument.importNode(
> >                                                d.getDocumentElement(), true);
> >                               result = _contextDocument.createDocumentFragment();
> > @@ -1956,8 +1949,6 @@
> >                                       result.appendChild(child);
> >                                       child = fragElt.getFirstChild();
> >                               }
> > -                             // String outp = serialize(d);
> > -
> >              } catch (SAXException se) {
> >                  throw new XMLEncryptionException("empty", se);
> >              } catch (ParserConfigurationException pce) {
> > @@ -1967,6 +1958,17 @@
> >              }
> >
> >              return (result);
> > +        }
> > +
> > +        protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
> > +            DocumentBuilderFactory dbf =
> > +                DocumentBuilderFactory.newInstance();
> > +            dbf.setNamespaceAware(true);
> > +            dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > +            DocumentBuilder db = dbf.newDocumentBuilder();
> > +            Document d = db.parse(
> > +                new InputSource(new StringReader(fragment)));
> > +            return d;
> >          }
> >      }
> >
> >
> >
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Davanum Srinivas <da...@gmail.com>.
Done. http://issues.apache.org/bugzilla/show_bug.cgi?id=40880

Thanks a ton!

-- dims

On 11/2/06, Raul Benito <ra...@apache.org> wrote:
> Ok, the change goes to 1.4 release
> Then we need to do a new RC. But before it, can you create bugzilla
> entry explaining it and update the Changelog accordingly ?. So I can
> label it, do a compilation, and upload the jar to people.apache.org
> before going to bed (2 hours left).
>
> Regards,
>
> Raul
> On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> > We've tried unfortunately no other fix is possible as far as we can
> > tell. we were setting the java wide system property for the DBF to
> > pick our impl and unfortunately no one can use that in production as
> > you well can tell, it's not kosher to do that :( Please help!
> >
> > -- dims
> >
> > On 11/2/06, Raul Benito <ra...@apache.org> wrote:
> > > Hi Dim,
> > > The change seem small and it seems a good feature.
> > > The problem is that 1.4 release is being delayed a lot(And sadly
> > > mainly because of my fault). So I must agree with Sean that perhaps is
> > > better to postpone it till 1.4 release.
> > > Do you think of any other solution?
> > >  or perhaps we should quick vote the inclusion?
> > >
> > >
> > > Regards,
> > >
> > > On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> > > > Sean,
> > > >
> > > > We have a showstopper in Axis2/WSS4J land. This is the only way to fix
> > > > the problem. I spent a lot of time into doing the least change.
> > > > Details are here:
> > > >
> > > > http://issues.apache.org/jira/browse/AXIS2-1570
> > > >
> > > > We need to be able to influence which DBF is picked up or we can't
> > > > ship our code :(
> > > >
> > > > -- dims
> > > >
> > > > On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> > > > > Hi Dims,
> > > > >
> > > > > Test or doc changes are fine, but I really don't think we should be
> > > > > making any code changes (especially RFEs) unless they are showstoppers
> > > > > until we ship 1.4 ...
> > > > >
> > > > > I have a bunch of stuff I want to fix but have been waiting until we get
> > > > > 1.4 out the door ...
> > > > >
> > > > > --Sean
> > > > >
> > > > > dims@apache.org wrote:
> > > > > > Author: dims
> > > > > > Date: Thu Nov  2 08:27:30 2006
> > > > > > New Revision: 470407
> > > > > >
> > > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> > > > > > Log:
> > > > > > Allow folks to extend XMLCipher to override the parseFragment method if they want to say cache the DBF in their own code
> > > > > >
> > > > > > Modified:
> > > > > >     xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > > > >
> > > > > > Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > > > > URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> > > > > > ==============================================================================
> > > > > > --- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
> > > > > > +++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Nov  2 08:27:30 2006
> > > > > > @@ -1939,14 +1939,7 @@
> > > > > >                       String fragment = sb.toString();
> > > > > >
> > > > > >              try {
> > > > > > -                DocumentBuilderFactory dbf =
> > > > > > -                    DocumentBuilderFactory.newInstance();
> > > > > > -                             dbf.setNamespaceAware(true);
> > > > > > -                             dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > > > -                             DocumentBuilder db = dbf.newDocumentBuilder();
> > > > > > -                             Document d = db.parse(
> > > > > > -                                 new InputSource(new StringReader(fragment)));
> > > > > > -
> > > > > > +                Document d = parseFragment(fragment);
> > > > > >                               Element fragElt = (Element) _contextDocument.importNode(
> > > > > >                                                d.getDocumentElement(), true);
> > > > > >                               result = _contextDocument.createDocumentFragment();
> > > > > > @@ -1956,8 +1949,6 @@
> > > > > >                                       result.appendChild(child);
> > > > > >                                       child = fragElt.getFirstChild();
> > > > > >                               }
> > > > > > -                             // String outp = serialize(d);
> > > > > > -
> > > > > >              } catch (SAXException se) {
> > > > > >                  throw new XMLEncryptionException("empty", se);
> > > > > >              } catch (ParserConfigurationException pce) {
> > > > > > @@ -1967,6 +1958,17 @@
> > > > > >              }
> > > > > >
> > > > > >              return (result);
> > > > > > +        }
> > > > > > +
> > > > > > +        protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
> > > > > > +            DocumentBuilderFactory dbf =
> > > > > > +                DocumentBuilderFactory.newInstance();
> > > > > > +            dbf.setNamespaceAware(true);
> > > > > > +            dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > > > +            DocumentBuilder db = dbf.newDocumentBuilder();
> > > > > > +            Document d = db.parse(
> > > > > > +                new InputSource(new StringReader(fragment)));
> > > > > > +            return d;
> > > > > >          }
> > > > > >      }
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
> > > >
> > >
> > >
> > > --
> > > http://r-bg.com
> > >
> >
> >
> > --
> > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
> >
>
>
> --
> http://r-bg.com
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Raul Benito <ra...@apache.org>.
Ok, the change goes to 1.4 release
Then we need to do a new RC. But before it, can you create bugzilla
entry explaining it and update the Changelog accordingly ?. So I can
label it, do a compilation, and upload the jar to people.apache.org
before going to bed (2 hours left).

Regards,

Raul
On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> We've tried unfortunately no other fix is possible as far as we can
> tell. we were setting the java wide system property for the DBF to
> pick our impl and unfortunately no one can use that in production as
> you well can tell, it's not kosher to do that :( Please help!
>
> -- dims
>
> On 11/2/06, Raul Benito <ra...@apache.org> wrote:
> > Hi Dim,
> > The change seem small and it seems a good feature.
> > The problem is that 1.4 release is being delayed a lot(And sadly
> > mainly because of my fault). So I must agree with Sean that perhaps is
> > better to postpone it till 1.4 release.
> > Do you think of any other solution?
> >  or perhaps we should quick vote the inclusion?
> >
> >
> > Regards,
> >
> > On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> > > Sean,
> > >
> > > We have a showstopper in Axis2/WSS4J land. This is the only way to fix
> > > the problem. I spent a lot of time into doing the least change.
> > > Details are here:
> > >
> > > http://issues.apache.org/jira/browse/AXIS2-1570
> > >
> > > We need to be able to influence which DBF is picked up or we can't
> > > ship our code :(
> > >
> > > -- dims
> > >
> > > On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> > > > Hi Dims,
> > > >
> > > > Test or doc changes are fine, but I really don't think we should be
> > > > making any code changes (especially RFEs) unless they are showstoppers
> > > > until we ship 1.4 ...
> > > >
> > > > I have a bunch of stuff I want to fix but have been waiting until we get
> > > > 1.4 out the door ...
> > > >
> > > > --Sean
> > > >
> > > > dims@apache.org wrote:
> > > > > Author: dims
> > > > > Date: Thu Nov  2 08:27:30 2006
> > > > > New Revision: 470407
> > > > >
> > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> > > > > Log:
> > > > > Allow folks to extend XMLCipher to override the parseFragment method if they want to say cache the DBF in their own code
> > > > >
> > > > > Modified:
> > > > >     xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > > >
> > > > > Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > > > URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> > > > > ==============================================================================
> > > > > --- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
> > > > > +++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Nov  2 08:27:30 2006
> > > > > @@ -1939,14 +1939,7 @@
> > > > >                       String fragment = sb.toString();
> > > > >
> > > > >              try {
> > > > > -                DocumentBuilderFactory dbf =
> > > > > -                    DocumentBuilderFactory.newInstance();
> > > > > -                             dbf.setNamespaceAware(true);
> > > > > -                             dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > > -                             DocumentBuilder db = dbf.newDocumentBuilder();
> > > > > -                             Document d = db.parse(
> > > > > -                                 new InputSource(new StringReader(fragment)));
> > > > > -
> > > > > +                Document d = parseFragment(fragment);
> > > > >                               Element fragElt = (Element) _contextDocument.importNode(
> > > > >                                                d.getDocumentElement(), true);
> > > > >                               result = _contextDocument.createDocumentFragment();
> > > > > @@ -1956,8 +1949,6 @@
> > > > >                                       result.appendChild(child);
> > > > >                                       child = fragElt.getFirstChild();
> > > > >                               }
> > > > > -                             // String outp = serialize(d);
> > > > > -
> > > > >              } catch (SAXException se) {
> > > > >                  throw new XMLEncryptionException("empty", se);
> > > > >              } catch (ParserConfigurationException pce) {
> > > > > @@ -1967,6 +1958,17 @@
> > > > >              }
> > > > >
> > > > >              return (result);
> > > > > +        }
> > > > > +
> > > > > +        protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
> > > > > +            DocumentBuilderFactory dbf =
> > > > > +                DocumentBuilderFactory.newInstance();
> > > > > +            dbf.setNamespaceAware(true);
> > > > > +            dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > > +            DocumentBuilder db = dbf.newDocumentBuilder();
> > > > > +            Document d = db.parse(
> > > > > +                new InputSource(new StringReader(fragment)));
> > > > > +            return d;
> > > > >          }
> > > > >      }
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
> > >
> >
> >
> > --
> > http://r-bg.com
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>


-- 
http://r-bg.com

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Davanum Srinivas <da...@gmail.com>.
Thanks Sean!! I owe both of you...

-- dims

On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> Yes, thanks for the link. I'm ok with it after reading the bug report
> though this close to release I just think we need to make sure everyone
> understands the problem and agrees it is a showstopper.
>
> Thanks,
> Sean
>
> Davanum Srinivas wrote:
> > We've tried unfortunately no other fix is possible as far as we can
> > tell. we were setting the java wide system property for the DBF to
> > pick our impl and unfortunately no one can use that in production as
> > you well can tell, it's not kosher to do that :( Please help!
> >
> > -- dims
> >
> > On 11/2/06, Raul Benito <ra...@apache.org> wrote:
> >> Hi Dim,
> >> The change seem small and it seems a good feature.
> >> The problem is that 1.4 release is being delayed a lot(And sadly
> >> mainly because of my fault). So I must agree with Sean that perhaps is
> >> better to postpone it till 1.4 release.
> >> Do you think of any other solution?
> >>  or perhaps we should quick vote the inclusion?
> >>
> >>
> >> Regards,
> >>
> >> On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> >> > Sean,
> >> >
> >> > We have a showstopper in Axis2/WSS4J land. This is the only way to fix
> >> > the problem. I spent a lot of time into doing the least change.
> >> > Details are here:
> >> >
> >> > http://issues.apache.org/jira/browse/AXIS2-1570
> >> >
> >> > We need to be able to influence which DBF is picked up or we can't
> >> > ship our code :(
> >> >
> >> > -- dims
> >> >
> >> > On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> >> > > Hi Dims,
> >> > >
> >> > > Test or doc changes are fine, but I really don't think we should be
> >> > > making any code changes (especially RFEs) unless they are
> >> showstoppers
> >> > > until we ship 1.4 ...
> >> > >
> >> > > I have a bunch of stuff I want to fix but have been waiting until
> >> we get
> >> > > 1.4 out the door ...
> >> > >
> >> > > --Sean
> >> > >
> >> > > dims@apache.org wrote:
> >> > > > Author: dims
> >> > > > Date: Thu Nov  2 08:27:30 2006
> >> > > > New Revision: 470407
> >> > > >
> >> > > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> >> > > > Log:
> >> > > > Allow folks to extend XMLCipher to override the parseFragment
> >> method if they want to say cache the DBF in their own code
> >> > > >
> >> > > > Modified:
> >> > > >
> >> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> >> > > >
> >> > > > Modified:
> >> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> >> > > > URL:
> >> http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> >>
> >> > > >
> >> ==============================================================================
> >>
> >> > > > ---
> >> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> >> (original)
> >> > > > +++
> >> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> >> Thu Nov  2 08:27:30 2006
> >> > > > @@ -1939,14 +1939,7 @@
> >> > > >                       String fragment = sb.toString();
> >> > > >
> >> > > >              try {
> >> > > > -                DocumentBuilderFactory dbf =
> >> > > > -                    DocumentBuilderFactory.newInstance();
> >> > > > -                             dbf.setNamespaceAware(true);
> >> > > > -
> >> dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> >> > > > -                             DocumentBuilder db =
> >> dbf.newDocumentBuilder();
> >> > > > -                             Document d = db.parse(
> >> > > > -                                 new InputSource(new
> >> StringReader(fragment)));
> >> > > > -
> >> > > > +                Document d = parseFragment(fragment);
> >> > > >                               Element fragElt = (Element)
> >> _contextDocument.importNode(
> >> > > >
> >> d.getDocumentElement(), true);
> >> > > >                               result =
> >> _contextDocument.createDocumentFragment();
> >> > > > @@ -1956,8 +1949,6 @@
> >> > > >                                       result.appendChild(child);
> >> > > >                                       child =
> >> fragElt.getFirstChild();
> >> > > >                               }
> >> > > > -                             // String outp = serialize(d);
> >> > > > -
> >> > > >              } catch (SAXException se) {
> >> > > >                  throw new XMLEncryptionException("empty", se);
> >> > > >              } catch (ParserConfigurationException pce) {
> >> > > > @@ -1967,6 +1958,17 @@
> >> > > >              }
> >> > > >
> >> > > >              return (result);
> >> > > > +        }
> >> > > > +
> >> > > > +        protected Document parseFragment(String fragment)
> >> throws ParserConfigurationException, SAXException, IOException {
> >> > > > +            DocumentBuilderFactory dbf =
> >> > > > +                DocumentBuilderFactory.newInstance();
> >> > > > +            dbf.setNamespaceAware(true);
> >> > > > +
> >> dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> >> > > > +            DocumentBuilder db = dbf.newDocumentBuilder();
> >> > > > +            Document d = db.parse(
> >> > > > +                new InputSource(new StringReader(fragment)));
> >> > > > +            return d;
> >> > > >          }
> >> > > >      }
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> >
> >> >
> >> > --
> >> > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
> >> Developers)
> >> >
> >>
> >>
> >> --
> >> http://r-bg.com
> >>
> >
> >
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Sean Mullan <Se...@Sun.COM>.
Yes, thanks for the link. I'm ok with it after reading the bug report 
though this close to release I just think we need to make sure everyone 
understands the problem and agrees it is a showstopper.

Thanks,
Sean

Davanum Srinivas wrote:
> We've tried unfortunately no other fix is possible as far as we can
> tell. we were setting the java wide system property for the DBF to
> pick our impl and unfortunately no one can use that in production as
> you well can tell, it's not kosher to do that :( Please help!
> 
> -- dims
> 
> On 11/2/06, Raul Benito <ra...@apache.org> wrote:
>> Hi Dim,
>> The change seem small and it seems a good feature.
>> The problem is that 1.4 release is being delayed a lot(And sadly
>> mainly because of my fault). So I must agree with Sean that perhaps is
>> better to postpone it till 1.4 release.
>> Do you think of any other solution?
>>  or perhaps we should quick vote the inclusion?
>>
>>
>> Regards,
>>
>> On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
>> > Sean,
>> >
>> > We have a showstopper in Axis2/WSS4J land. This is the only way to fix
>> > the problem. I spent a lot of time into doing the least change.
>> > Details are here:
>> >
>> > http://issues.apache.org/jira/browse/AXIS2-1570
>> >
>> > We need to be able to influence which DBF is picked up or we can't
>> > ship our code :(
>> >
>> > -- dims
>> >
>> > On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
>> > > Hi Dims,
>> > >
>> > > Test or doc changes are fine, but I really don't think we should be
>> > > making any code changes (especially RFEs) unless they are 
>> showstoppers
>> > > until we ship 1.4 ...
>> > >
>> > > I have a bunch of stuff I want to fix but have been waiting until 
>> we get
>> > > 1.4 out the door ...
>> > >
>> > > --Sean
>> > >
>> > > dims@apache.org wrote:
>> > > > Author: dims
>> > > > Date: Thu Nov  2 08:27:30 2006
>> > > > New Revision: 470407
>> > > >
>> > > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
>> > > > Log:
>> > > > Allow folks to extend XMLCipher to override the parseFragment 
>> method if they want to say cache the DBF in their own code
>> > > >
>> > > > Modified:
>> > > >     
>> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
>> > > >
>> > > > Modified: 
>> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
>> > > > URL: 
>> http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407 
>>
>> > > > 
>> ============================================================================== 
>>
>> > > > --- 
>> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java 
>> (original)
>> > > > +++ 
>> xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java 
>> Thu Nov  2 08:27:30 2006
>> > > > @@ -1939,14 +1939,7 @@
>> > > >                       String fragment = sb.toString();
>> > > >
>> > > >              try {
>> > > > -                DocumentBuilderFactory dbf =
>> > > > -                    DocumentBuilderFactory.newInstance();
>> > > > -                             dbf.setNamespaceAware(true);
>> > > > -                             
>> dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
>> > > > -                             DocumentBuilder db = 
>> dbf.newDocumentBuilder();
>> > > > -                             Document d = db.parse(
>> > > > -                                 new InputSource(new 
>> StringReader(fragment)));
>> > > > -
>> > > > +                Document d = parseFragment(fragment);
>> > > >                               Element fragElt = (Element) 
>> _contextDocument.importNode(
>> > > >                                                
>> d.getDocumentElement(), true);
>> > > >                               result = 
>> _contextDocument.createDocumentFragment();
>> > > > @@ -1956,8 +1949,6 @@
>> > > >                                       result.appendChild(child);
>> > > >                                       child = 
>> fragElt.getFirstChild();
>> > > >                               }
>> > > > -                             // String outp = serialize(d);
>> > > > -
>> > > >              } catch (SAXException se) {
>> > > >                  throw new XMLEncryptionException("empty", se);
>> > > >              } catch (ParserConfigurationException pce) {
>> > > > @@ -1967,6 +1958,17 @@
>> > > >              }
>> > > >
>> > > >              return (result);
>> > > > +        }
>> > > > +
>> > > > +        protected Document parseFragment(String fragment) 
>> throws ParserConfigurationException, SAXException, IOException {
>> > > > +            DocumentBuilderFactory dbf =
>> > > > +                DocumentBuilderFactory.newInstance();
>> > > > +            dbf.setNamespaceAware(true);
>> > > > +            
>> dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
>> > > > +            DocumentBuilder db = dbf.newDocumentBuilder();
>> > > > +            Document d = db.parse(
>> > > > +                new InputSource(new StringReader(fragment)));
>> > > > +            return d;
>> > > >          }
>> > > >      }
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>> > --
>> > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service 
>> Developers)
>> >
>>
>>
>> -- 
>> http://r-bg.com
>>
> 
> 


Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Davanum Srinivas <da...@gmail.com>.
We've tried unfortunately no other fix is possible as far as we can
tell. we were setting the java wide system property for the DBF to
pick our impl and unfortunately no one can use that in production as
you well can tell, it's not kosher to do that :( Please help!

-- dims

On 11/2/06, Raul Benito <ra...@apache.org> wrote:
> Hi Dim,
> The change seem small and it seems a good feature.
> The problem is that 1.4 release is being delayed a lot(And sadly
> mainly because of my fault). So I must agree with Sean that perhaps is
> better to postpone it till 1.4 release.
> Do you think of any other solution?
>  or perhaps we should quick vote the inclusion?
>
>
> Regards,
>
> On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> > Sean,
> >
> > We have a showstopper in Axis2/WSS4J land. This is the only way to fix
> > the problem. I spent a lot of time into doing the least change.
> > Details are here:
> >
> > http://issues.apache.org/jira/browse/AXIS2-1570
> >
> > We need to be able to influence which DBF is picked up or we can't
> > ship our code :(
> >
> > -- dims
> >
> > On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> > > Hi Dims,
> > >
> > > Test or doc changes are fine, but I really don't think we should be
> > > making any code changes (especially RFEs) unless they are showstoppers
> > > until we ship 1.4 ...
> > >
> > > I have a bunch of stuff I want to fix but have been waiting until we get
> > > 1.4 out the door ...
> > >
> > > --Sean
> > >
> > > dims@apache.org wrote:
> > > > Author: dims
> > > > Date: Thu Nov  2 08:27:30 2006
> > > > New Revision: 470407
> > > >
> > > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> > > > Log:
> > > > Allow folks to extend XMLCipher to override the parseFragment method if they want to say cache the DBF in their own code
> > > >
> > > > Modified:
> > > >     xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > >
> > > > Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > > URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> > > > ==============================================================================
> > > > --- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
> > > > +++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Nov  2 08:27:30 2006
> > > > @@ -1939,14 +1939,7 @@
> > > >                       String fragment = sb.toString();
> > > >
> > > >              try {
> > > > -                DocumentBuilderFactory dbf =
> > > > -                    DocumentBuilderFactory.newInstance();
> > > > -                             dbf.setNamespaceAware(true);
> > > > -                             dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > -                             DocumentBuilder db = dbf.newDocumentBuilder();
> > > > -                             Document d = db.parse(
> > > > -                                 new InputSource(new StringReader(fragment)));
> > > > -
> > > > +                Document d = parseFragment(fragment);
> > > >                               Element fragElt = (Element) _contextDocument.importNode(
> > > >                                                d.getDocumentElement(), true);
> > > >                               result = _contextDocument.createDocumentFragment();
> > > > @@ -1956,8 +1949,6 @@
> > > >                                       result.appendChild(child);
> > > >                                       child = fragElt.getFirstChild();
> > > >                               }
> > > > -                             // String outp = serialize(d);
> > > > -
> > > >              } catch (SAXException se) {
> > > >                  throw new XMLEncryptionException("empty", se);
> > > >              } catch (ParserConfigurationException pce) {
> > > > @@ -1967,6 +1958,17 @@
> > > >              }
> > > >
> > > >              return (result);
> > > > +        }
> > > > +
> > > > +        protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
> > > > +            DocumentBuilderFactory dbf =
> > > > +                DocumentBuilderFactory.newInstance();
> > > > +            dbf.setNamespaceAware(true);
> > > > +            dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > > +            DocumentBuilder db = dbf.newDocumentBuilder();
> > > > +            Document d = db.parse(
> > > > +                new InputSource(new StringReader(fragment)));
> > > > +            return d;
> > > >          }
> > > >      }
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
> >
>
>
> --
> http://r-bg.com
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

Re: svn commit: r470407 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Posted by Raul Benito <ra...@apache.org>.
Hi Dim,
The change seem small and it seems a good feature.
The problem is that 1.4 release is being delayed a lot(And sadly
mainly because of my fault). So I must agree with Sean that perhaps is
better to postpone it till 1.4 release.
Do you think of any other solution?
 or perhaps we should quick vote the inclusion?


Regards,

On 11/2/06, Davanum Srinivas <da...@gmail.com> wrote:
> Sean,
>
> We have a showstopper in Axis2/WSS4J land. This is the only way to fix
> the problem. I spent a lot of time into doing the least change.
> Details are here:
>
> http://issues.apache.org/jira/browse/AXIS2-1570
>
> We need to be able to influence which DBF is picked up or we can't
> ship our code :(
>
> -- dims
>
> On 11/2/06, Sean Mullan <Se...@sun.com> wrote:
> > Hi Dims,
> >
> > Test or doc changes are fine, but I really don't think we should be
> > making any code changes (especially RFEs) unless they are showstoppers
> > until we ship 1.4 ...
> >
> > I have a bunch of stuff I want to fix but have been waiting until we get
> > 1.4 out the door ...
> >
> > --Sean
> >
> > dims@apache.org wrote:
> > > Author: dims
> > > Date: Thu Nov  2 08:27:30 2006
> > > New Revision: 470407
> > >
> > > URL: http://svn.apache.org/viewvc?view=rev&rev=470407
> > > Log:
> > > Allow folks to extend XMLCipher to override the parseFragment method if they want to say cache the DBF in their own code
> > >
> > > Modified:
> > >     xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > >
> > > Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
> > > URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?view=diff&rev=470407&r1=470406&r2=470407
> > > ==============================================================================
> > > --- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
> > > +++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Nov  2 08:27:30 2006
> > > @@ -1939,14 +1939,7 @@
> > >                       String fragment = sb.toString();
> > >
> > >              try {
> > > -                DocumentBuilderFactory dbf =
> > > -                    DocumentBuilderFactory.newInstance();
> > > -                             dbf.setNamespaceAware(true);
> > > -                             dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > -                             DocumentBuilder db = dbf.newDocumentBuilder();
> > > -                             Document d = db.parse(
> > > -                                 new InputSource(new StringReader(fragment)));
> > > -
> > > +                Document d = parseFragment(fragment);
> > >                               Element fragElt = (Element) _contextDocument.importNode(
> > >                                                d.getDocumentElement(), true);
> > >                               result = _contextDocument.createDocumentFragment();
> > > @@ -1956,8 +1949,6 @@
> > >                                       result.appendChild(child);
> > >                                       child = fragElt.getFirstChild();
> > >                               }
> > > -                             // String outp = serialize(d);
> > > -
> > >              } catch (SAXException se) {
> > >                  throw new XMLEncryptionException("empty", se);
> > >              } catch (ParserConfigurationException pce) {
> > > @@ -1967,6 +1958,17 @@
> > >              }
> > >
> > >              return (result);
> > > +        }
> > > +
> > > +        protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
> > > +            DocumentBuilderFactory dbf =
> > > +                DocumentBuilderFactory.newInstance();
> > > +            dbf.setNamespaceAware(true);
> > > +            dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE);
> > > +            DocumentBuilder db = dbf.newDocumentBuilder();
> > > +            Document d = db.parse(
> > > +                new InputSource(new StringReader(fragment)));
> > > +            return d;
> > >          }
> > >      }
> > >
> > >
> > >
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>


-- 
http://r-bg.com