Details
Description
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)
}
} else if ("=".equals(token))
}
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
Sorry the fix should be,
while ((token = scanToken()) != null &&
!token.startsWith("?>")) {
.....
}
instead of
while ((token = scanToken()) != null &&
!"?>".equals(token)) {
.....
}