cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-1657) CheckFaultInterceptor causes XMLStreamReader to throw IllegalState at doc end
Date Fri, 08 Aug 2008 21:23:44 GMT

     [ https://issues.apache.org/jira/browse/CXF-1657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-1657.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.9
                   2.1.2
         Assignee: Daniel Kulp

> CheckFaultInterceptor causes XMLStreamReader to throw IllegalState at doc end
> -----------------------------------------------------------------------------
>
>                 Key: CXF-1657
>                 URL: https://issues.apache.org/jira/browse/CXF-1657
>             Project: CXF
>          Issue Type: Bug
>          Components: Soap Binding
>    Affects Versions: 2.1
>            Reporter: Jayson Raymond
>            Assignee: Daniel Kulp
>             Fix For: 2.1.2, 2.0.9
>
>
> From handleMessage():
>   :
>         try {
>             // advance to first tag.
>             int x = xmlReader.getEventType();
>             while (x != XMLStreamReader.START_ELEMENT
>                 && x != XMLStreamReader.END_ELEMENT
>                 && xmlReader.hasNext()) {
>                 x = xmlReader.next();
>             }
>         } catch (XMLStreamException e) {
>             throw new SoapFault(new Message("XML_STREAM_EXC", LOG), e, 
>                                 message.getVersion().getSender());
>         }
>         if (message.getVersion().getFault().equals(xmlReader.getName())) {
>  :
> In the case where hasNext() == false (e.g. document end) will cause the subsequent call
to xmlReader.getName() to throw an IllegalStateException, as per the javax.xml.stream,XMLStreamReader
interface. It would seem the appropriate response would be to simply return in this case:
>   :
>         try {
>             // advance to first tag.
>             int x = xmlReader.getEventType();
>             while (x != XMLStreamReader.START_ELEMENT
>                 && x != XMLStreamReader.END_ELEMENT
>                 && xmlReader.hasNext()) {
>                 x = xmlReader.next();
>             }
>             if ( x==XMLStreamReader.END_DOCUMENT) return;
>         } catch (XMLStreamException e) {
>  :

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message