JIBX hangs while reading from streaming XML
-------------------------------------------
Key: JIBX-82
URL: http://jira.codehaus.org/browse/JIBX-82
Project: JiBX
Type: Improvement
Components: core
Reporter: Ivan Hadzhiiliev
Priority: Minor
I'm using a service that sends back an xml response. The problem is that there
are no separators between the xml tags and it seems that when
InputStreamWrapper is reading the tokens the in the getReader method it reads
forever, because the end of the inital <?xml version="1.0"?> cannot be
recognized. The token contains the first part of the next tag, i.e.
?><some-name. Then the following loop continues forever,
while ((token = scanToken()) != null &&
!"?>".startsWith(token)) {
if ("encoding".equals(token)) {
if ("=".equals(scanToken())) {
token = scanQuoted();
if (token != null) {
m_encodingName = token;
break;
}
}
} else if ("=".equals(token)) {
scanQuoted();
}
}
If I skip 21 bytes from the stream before the unmarshalling then there is no
problem.
We'll probably patcth JIBX for now, so instead of comparing by using equals
while ((token = scanToken()) != null &&
!"?>".startsWith(token)) {
........
},
use startsWith
while ((token = scanToken()) != null &&
!"?>".startsWith(token)) {
.....
}
Thanks.
-Ivan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs