[ http://jira.codehaus.org/browse/JIBX-82?page=all ]
     
Dennis Sosnoski resolved JIBX-82:
---------------------------------

    Resolution: Fixed

> JIBX hangs while reading from streaming XML
> -------------------------------------------
>
>          Key: JIBX-82
>          URL: http://jira.codehaus.org/browse/JIBX-82
>      Project: JiBX
>         Type: Improvement

>   Components: core
>     Versions: 1.0-RC1
>     Reporter: Ivan Hadzhiiliev
>     Assignee: Dennis Sosnoski
>     Priority: Minor
>      Fix For: 1.0-RC2

>
>
> 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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to