perfsonar-dev - Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems
Subject: perfsonar development work
List archive
Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems
Chronological Thread
- From: Tsompanidis Ilias <>
- To: Loukik Kudarimoti <>
- Cc: Roman Lapcz <>, Jason Zurawski <>, "" <>, , Michael Michalis <>, Szymon Trocha <>
- Subject: Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems
- Date: Mon, 19 Mar 2007 10:18:17 +0200
Loukik Kudarimoti wrote:
Hi guys,RRDMA is affected too. The easiest way to see it is to test the Echo functionality :
I just spent quite a while trying to debug a problem where in I was unable to get responses from SQL MA. Turns out, its all because of new line characters in xml tag contents which were introduced either in the store or in the request message.
When any part of the service implementation is trying to compare two strings - one hardcoded within the implementation (such as eventType value) and the second one coming from the xml message (via the Message bean), even if the strings are similar except for new-line characters, the checks fail. This definitely needs to be taken care of.
Initially I thought that we could take care of this at the Message bean level (by stripping empty strings around a text). But I am not 100% sure of the outcome. I am not sure because for some strings, white spaces *between the text* are important (command line mp for example). Jason, what do you think? I found out the String.trim() method will remove leading and trailing white spaces but not sure about white lines?
Any thoughts anybody? This bug can cause problems because the configurations at least are created by the users and its difficult to get them to remove such white spaces and new lines. It affects SQL MA for sure and maybe RRD MA (Ilias?)
"http://schemas.perfsonar.net/tools/admin/echo/2.0 "
instead of the working event_type
"http://schemas.perfsonar.net/tools/admin/echo/2.0" .
One way to come around it would be using regular expression match, instead of .equals(). In perl it would be something like:
$string =~ m/something_interesting/
I know that java has a reg exp engine of equal strength to perl's. Maybe it could come in handy.
Ilias
Loukik.
begin:vcard fn:Ilias Tsompanidis n:Tsompanidis;Ilias org:Aristotle University of Thessaloniki;Network Operation Center adr:;;;Thessaloniki;;;Greece email;internet: tel;work:+30 2310999400 int. 24 tel;cell:+30 6938995001 x-mozilla-html:TRUE url:http://noc.auth.gr version:2.1 end:vcard
- IMPORTANT: new line characters and white spaces in xml causing problems, Loukik Kudarimoti, 03/16/2007
- Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems, Jason Zurawski, 03/16/2007
- Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems, Jason Zurawski, 03/16/2007
- RE: IMPORTANT: new line characters and white spaces in xml causing problems, Michael Michalis, 03/19/2007
- Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems, Tsompanidis Ilias, 03/19/2007
- Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems, Roman Lapacz, 03/19/2007
- Re: [pS-dev] IMPORTANT: new line characters and white spaces in xml causing problems, Jason Zurawski, 03/16/2007
Archive powered by MHonArc 2.6.16.