Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Ok, I ran 11 different test cases (see attached old.txt and new.txt). You will see that in the old.txt, the current version of the DOM2Writer succeeds in all but three use cases, two of which are related to the improper namespace declaration issue. I had to make a few minor changes, but the

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Hmm.. I see what you mean on the first one... I see a fairly minor issue, just gotta tweak a bit (that's why I posted to the list prior to committing the code ;-) ...) The second approach should be covered without problem. Lemme go back and check. - James Snell Software Engineer, Intern

RE: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Hey... grab some popcorn! This kinda stuff is fun isn't it :-D - James Snell Software Engineer, Internet Emerging Technologies, IBM James M Snell/Fresno/IBM - [EMAIL PROTECTED] These things I have spoken to you, so that in Me you may have peace. In the world you have tribulation, but t

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
> A plea for sanity here: my own personal belief is that the correct behavior > of code when receiving invalid input is undefined. So, let me turn the > question around: why is the current behavior which produces not well formed > output preferred over one that does? My opinion only: Because it

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
There is a problem there: will that get recognized correctly with your hack? What about: (I'm not sure about this one.) Will it also not have the unintended side-effect of eliminating redundant declarations the programmer may have put in intentionally? Maybe that's a

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
Yeah, its been a while since we've had any interesting arguments on this list! Gotta wake up every once in a while .. Sanjiva. - Original Message - From: "Hansen, Richard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 29, 2001 2:13 AM Subject: RE: Bug with DOM2Wri

https and Apache SOAP...

2001-09-28 Thread Ashutosh Arora
Hello Everybody, I am trying to use https with Apache SOAP and Tomcat for invoking a web-service. My project requires me to write my custom protocol handlers. I mean my project uses URL class to load my custom protocol handler for http and https. There I've to set the system property "java.protoco

RE: Bug with DOM2Writer

2001-09-28 Thread Hansen, Richard
I must say that I am enjoying this thread immensely. :-) But I have an odd sense of humor and love a friendly and spirited argument. Rick Hansen > -Original Message- > From: Sam Ruby [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 2:51 PM > To: [EMAIL PROTECTED] > Subject:

Re: Bug with DOM2Writer

2001-09-28 Thread Sam Ruby
Sanjiva Weerawarana wrote: > > Sam, in general I don't support the principle of becoming bug > compatible. Oh, joy. A principles vs. pragmatism argument. A plea for sanity here: my own personal belief is that the correct behavior of code when receiving invalid input is undefined. So, let me tu

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Also, I don't see this as being "bug compatible", I see it as being "bug aware". We know that people will be using the improper method of declaring namespaces and that there may be nothing we can do to stop it, so why not accept that it'll happen and deal with it? It's such a minor change to

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
My change is checking to see if the attribute name starts with "xmlns:" and if so, check to see if that namespace has already been declared. If so, skip it. No problem there. - James Snell Software Engineer, Internet Emerging Technologies, IBM James M Snell/Fresno/IBM - [EMAIL PROTE

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
The example I gave is actually irrelevant... I just put that together off the fly to illustrate the basic problem. - James Snell Software Engineer, Internet Emerging Technologies, IBM James M Snell/Fresno/IBM - [EMAIL PROTECTED] These things I have spoken to you, so that in Me you may

How to convert an XML dom to a string again

2001-09-28 Thread Richard Wu
Hi, we can convert an XML document text string to an XML dom via StingReader/InputStream but can we convert an XML dom to an XML document text string via StringWriter/OutputStream? I tried to figure this out but not sure where to start. Really any suggestion or idea! Richard Wu

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
> James M Snell wrote: > > > > There is nothing in my proposed set of changes that would violate rule > #1. > > OK, then Sanjiva, what is your objection? > > - Sam Ruby I'd like a bit of evidence beyond a declaration: James, why do you think that your changes would not make a valid DOM produce

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
I was just noticing something in James' original note: > Example, let's say I want to create the following XML output: > > test.setPrefix("s"); > test.setAttribute("xmlns:s", "testing"); > Element hello = doc.createElementNS("testing", "hello"); > test.appendChild(hello); > doc.appendChild(test

Re: Bug with DOM2Writer

2001-09-28 Thread Sam Ruby
James M Snell wrote: > > There is nothing in my proposed set of changes that would violate rule #1. OK, then Sanjiva, what is your objection? - Sam Ruby

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
>Let me see if I can find some areas where there is likely some agreement: > >1) DOM2Writer must always correctly process any well formed as XML as >input. > >2) It appears to be possible to produce invalid XML using the DOM APIs. > >3) DOM2Writer should always produce well formed XML as output >

RE: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Yes, I know. That clearly was not my point. - James Snell Software Engineer, Internet Emerging Technologies, IBM James M Snell/Fresno/IBM - [EMAIL PROTECTED] These things I have spoken to you, so that in Me you may have peace. In the world you have tribulation, but take courage; I hav

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
So the net result is that people who use code that duplicates this problem, such as XSS, where the use of the DOM API's is completely out of their control (or would simply be too expensive to be forced to go back and fix) cannot use that code with Apache SOAP. That's not really all that accep

RE: Bug with DOM2Writer

2001-09-28 Thread Matthew J. Duftler
Hi James, I imagine that to have bugs fixed in product XYZ, you follow product XYZ's procedure for having bugs fixed. For instance, ours is to use Bugzilla. Thanks, -Matt > -Original Message- > From: James M Snell [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 11:50 AM >

Re: Bug with DOM2Writer

2001-09-28 Thread Sam Ruby
Sanjiva Weerawarana wrote: > >> But, if you still disagree, I recommend that we put it to a vote. > >Well, if it must, fine. I'm -1'ing it for sure. > >Also, I recommend that we only take votes from people who've been >participating in the development say in the last 6 months. I know >there are 10

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Matt, Ok, lemme back up again and say this: everything you're saying is correct. But... a. There are lots of people, lotsa places that are duplicating this problem. I've even seen tutorials that demonstrate this way of "declaring" the namespace! b. Code that uses this technique is alread

Re: Bug with DOM2Writer

2001-09-28 Thread James M Snell
Matt, Yes, I am quite aware of this, but the already in production code that I cannot change does not live by these rules. And I know that there is lotsa other code out there that doesn't either. How would you propose we deal with those situations? - James Snell Software Engineer, Int

Re: Bug with DOM2Writer

2001-09-28 Thread Sanjiva Weerawarana
> If the change is not made, we run the risk of having code that currently > works outside of Apache SOAP not work within Apache SOAP, which would be a > > very bad thing. What's the easiest thing to do? I'm sure providing a First of all, if someone's using DOM2Writer from Apache SOAP then that

RE: Bug with DOM2Writer

2001-09-28 Thread Matthew J. Duftler
Again, you are using the createElementNS(...) method incorrectly. > Ok, so now we have the same "bug" (using setAttribute to declare > namespaces) repeated in two major products. What do we do about it? > Ignore it ? I'd rather not. I quite actually need this fixed as I can't > very well go an

Re: Bug with DOM2Writer

2001-09-28 Thread Matthew Duftler
Hi James, I agree with Sanjiva. The problem is the way you are using the DOM APIs. To create a qualified element, the method is: public Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException Note that the second argument is called "qualified

Re: Are IIS/Tomcat Multi-threaded??

2001-09-28 Thread Scott Nichol
IIS and Tomcat are multi-threaded, although rather than spawning new threads, they mostly allocate threads from a pool. Tomcat can actually be used for two servers, one for HTTP and the other for the "JServ" protocol. Tomcat can then be used as a servlet container with other HTTP servers (IIS, Ap

Re: Bug with DOM2Writer

2001-09-28 Thread Andreas Ullmann
Adding the namespace as an attribute would make it possible to verify the XML against an DTD right? But if Xerces would handle the namesspaces as expected, the problem should be solved right? So in my eyes this is a Xerces problem. I know it would be hard to change the Xerces impl which thous

Are IIS/Tomcat Multi-threaded??

2001-09-28 Thread Naresh Agarwal
Hi I want to ask something about the servers ( IIS for MS-Soap, Tomcat for Apache-Soap), which host the Soap services Are these servers (IIS and Tomcat) multithreaded, i.e. for each request, a new thread is spawned which handles that particular request. If yes, then any thread safe service, whi