You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dmitry (JIRA)" <ji...@apache.org> on 2008/09/27 20:53:44 UTC

[jira] Created: (CXF-1828) inFaultInterceptors doesn't work as expected

inFaultInterceptors doesn't work as expected
--------------------------------------------

                 Key: CXF-1828
                 URL: https://issues.apache.org/jira/browse/CXF-1828
             Project: CXF
          Issue Type: Bug
          Components: Bus, Samples
    Affects Versions: 2.1.2
         Environment: java 1.6

            Reporter: Dmitry


I'm trying to zip FAULT response from server. 
Server properly zip response , so server's [outFaultInterceptors] work fine
But, It looks like client couldn't properly process it in [inFaultInterceptors]
Step to reproduce:
1. Upade sample code from standart distributive 
     apache-cxf-2.1.2/samples/configuration_interceptor 
client.xml:
    <cxf:bus>
        <cxf:inInterceptors>
        </cxf:inInterceptors>
        <cxf:inFaultInterceptors>
            <ref bean="GZIPStream"/>            
        </cxf:inFaultInterceptors>

        <!--cxf:outInterceptors>            
            <ref bean="GZIPStream"/>        
        </cxf:outInterceptors>
        <cxf:outFaultInterceptors>           
             <ref bean="GZIPStream"/>
        </cxf:outFaultInterceptors-->
    </cxf:bus>

server:xml:
    <cxf:bus>
        <!--cxf:inInterceptors>
            <ref bean="GZIPStream"/>
        </cxf:inInterceptors>
        <cxf:inFaultInterceptors>
            <ref bean="GZIPStream"/>            
        </cxf:inFaultInterceptors-->
        <cxf:outInterceptors>            
            <!--ref bean="GZIPStream"/-->        
        </cxf:outInterceptors>
        <cxf:outFaultInterceptors>           
             <ref bean="GZIPStream"/>
        </cxf:outFaultInterceptors>
    </cxf:bus>

Client.java:
add next code and uncomment //import lines:

import org.apache.hello_world_soap_http.PingMeFault;
import org.apache.hello_world_soap_http.types.FaultDetail;

...
        try {
            System.out.println("Invoking pingMe, expecting exception...");
            port.pingMe();
        } catch (PingMeFault ex) {
            System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
            FaultDetail detail = ex.getFaultInfo();
            System.out.println("FaultDetail major:" + detail.getMajor());
            System.out.println("FaultDetail minor:" + detail.getMinor());            
        }          
        System.exit(0); 
}

Result: 

     [java] Invoking pingMe, expecting exception...
     [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
     [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
     [java] 	at $Proxy41.pingMe(Unknown Source)
     [java] 	at demo.stream.client.Client.main(Client.java:67)
     [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
     [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
     [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
     [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
     [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
     [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
     [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
     [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
     [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
     [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
     [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
     [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
     [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
     [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
     [java] 	... 2 more
     [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
     [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
     [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
     [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
     [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
     [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
     [java] 	... 14 more
     [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
     [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
     [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
     [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
     [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
     [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
     [java] 	... 18 more


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


[jira] Commented: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry Savenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653892#action_12653892 ] 

Dmitry Savenko commented on CXF-1828:
-------------------------------------

Thanks a lot Sean!

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry Savenko
>            Assignee: Sean O'Callaghan
>             Fix For: 2.2
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry updated CXF-1828:
------------------------

    Affects Version/s: 2.1.2

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2
>         Environment: java 1.6
>            Reporter: Dmitry
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Commented: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635185#action_12635185 ] 

Dmitry commented on CXF-1828:
-----------------------------

version 2.1.3 works even worse
Change server.xml to zip FAULT response:
        <cxf:outFaultInterceptors>           
             <ref bean="GZIPStream"/>
        </cxf:outFaultInterceptors>
But intentionally leave client.xml
        <cxf:inFaultInterceptors>
        </cxf:inFaultInterceptors>

Obviously client should throws Exception when received compressed FAULT response from server
But it doesn't!


> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2
>         Environment: java 1.6
>            Reporter: Dmitry
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Issue Comment Edited: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653332#action_12653332 ] 

seanoc edited comment on CXF-1828 at 12/4/08 7:41 AM:
----------------------------------------------------------------

The problem can be reproduced using the standard configuration_interceptor demo, on the trunk.

However there is some behaviour which is a little bizzare:

It seems that if the server is run within eclipse the demo will run fine but if run from the command line it will fail. This is irrespective of whether the client is tun in eclipse or command line.

This indicates some resource or environmental factor in the problem, perhaps classpath but I haven't been able to figure out  what exactly yet.



      was (Author: seanoc):
    Some behaviour which is a little bizzare.

It seems that if the server is run within eclipse the demo will run fine but if run from the command line it will fail.
This indicates some resource or environmental factor in the problem, perhaps classpath but I haven't been able to figure out  what exactly yet.


  
> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry updated CXF-1828:
------------------------

    Affects Version/s: 2.1.3

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry updated CXF-1828:
------------------------

    Affects Version/s:     (was: 2.1.2)
                       2.1.1

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1
>         Environment: java 1.6
>            Reporter: Dmitry
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Resolved: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan resolved CXF-1828.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.1.4)
                   2.2

Fixed the original configuration_interceptor demo as it was not picking up the  configuration files client.xml and server.xml correctly .

Using the provided files from Dimtry, the demo runs as expected:

server output:

[INFO] Executing operation pingMe, throwing PingMeFault exception
[INFO]
[INFO] INFO: Executing operation pingMe, throwing PingMeFault exception
[INFO] 05-Dec-2008 14:32:48 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
[INFO] INFO: Application has thrown exception, unwinding now: org.apache.hello_world_soap_http.PingMeFault: PingMeFault raised by server

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.2
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan updated CXF-1828:
----------------------------------

    Comment: was deleted

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Closed: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan closed CXF-1828.
---------------------------------


> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.2
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Commented: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652424#action_12652424 ] 

Sean O'Callaghan commented on CXF-1828:
---------------------------------------

Hi Dmitry,

I've just begun looking at this and can reproduce the issue with the configuration_interceptor as is(without your modifications). 

(Note, I'm working off trunk 2.2-SNAPSHOT).

I then modified the client so that instead of having the WSDL passed into it, it was read in as a resource:

wsdlURL = Client.class.getResource("hello_world.wsdl");

You will need to modify the pom.xml in order for the Client.class to be able to access the wsdl;

 <tasks>
   <copy file="${basedir}/src/demo/stream/client/client.xml" todir="${basedir}/target/classes/demo/stream/client"/>
   <copy file="${basedir}/src/demo/stream/server/server.xml" todir="${basedir}/target/classes/demo/stream/server"/>
   <copy file="${basedir}/wsdl/hello_world.wsdl" todir="${basedir}/target/classes/demo/stream/client"/> add this line
 </tasks>
</configuration>

I haven't figured out why the difference in behaviour but am curious as to what behaviour you see after such changes?

Seán.




> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry updated CXF-1828:
------------------------

    Fix Version/s: 2.1.3

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>             Fix For: 2.1.3
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Commented: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653332#action_12653332 ] 

Sean O'Callaghan commented on CXF-1828:
---------------------------------------

Some behaviour which is a little bizzare.

It seems that if the server is run within eclipse the demo will run fine but if run from the command line it will fail.
This indicates some resource or environmental factor in the problem, perhaps classpath but I haven't been able to figure out  what exactly yet.



> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Dmitry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry updated CXF-1828:
------------------------

    Attachment: server.xml
                client.xml
                Client.java

Find updated files from samples/configuration_interceptor in the attachment  

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.2
>         Environment: java 1.6
>            Reporter: Dmitry
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CXF-1828:
------------------------------

    Fix Version/s:     (was: 2.1.3)
                   2.1.4

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Assigned: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan reassigned CXF-1828:
-------------------------------------

    Assignee: Sean O'Callaghan

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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


[jira] Updated: (CXF-1828) inFaultInterceptors doesn't work as expected

Posted by "Sean O'Callaghan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean O'Callaghan updated CXF-1828:
----------------------------------

    Comment: was deleted

> inFaultInterceptors doesn't work as expected
> --------------------------------------------
>
>                 Key: CXF-1828
>                 URL: https://issues.apache.org/jira/browse/CXF-1828
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, Samples
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3
>         Environment: java 1.6
>            Reporter: Dmitry
>            Assignee: Sean O'Callaghan
>             Fix For: 2.1.4
>
>         Attachments: Client.java, client.xml, server.xml
>
>
> I'm trying to zip FAULT response from server. 
> Server properly zip response , so server's [outFaultInterceptors] work fine
> But, It looks like client couldn't properly process it in [inFaultInterceptors]
> Step to reproduce:
> 1. Upade sample code from standart distributive 
>      apache-cxf-2.1.2/samples/configuration_interceptor 
> client.xml:
>     <cxf:bus>
>         <cxf:inInterceptors>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors>
>         <!--cxf:outInterceptors>            
>             <ref bean="GZIPStream"/>        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors-->
>     </cxf:bus>
> server:xml:
>     <cxf:bus>
>         <!--cxf:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </cxf:inInterceptors>
>         <cxf:inFaultInterceptors>
>             <ref bean="GZIPStream"/>            
>         </cxf:inFaultInterceptors-->
>         <cxf:outInterceptors>            
>             <!--ref bean="GZIPStream"/-->        
>         </cxf:outInterceptors>
>         <cxf:outFaultInterceptors>           
>              <ref bean="GZIPStream"/>
>         </cxf:outFaultInterceptors>
>     </cxf:bus>
> Client.java:
> add next code and uncomment //import lines:
> import org.apache.hello_world_soap_http.PingMeFault;
> import org.apache.hello_world_soap_http.types.FaultDetail;
> ...
>         try {
>             System.out.println("Invoking pingMe, expecting exception...");
>             port.pingMe();
>         } catch (PingMeFault ex) {
>             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
>             FaultDetail detail = ex.getFaultInfo();
>             System.out.println("FaultDetail major:" + detail.getMajor());
>             System.out.println("FaultDetail minor:" + detail.getMinor());            
>         }          
>         System.exit(0); 
> }
> Result: 
>      [java] Invoking pingMe, expecting exception...
>      [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
>      [java] 	at $Proxy41.pingMe(Unknown Source)
>      [java] 	at demo.stream.client.Client.main(Client.java:67)
>      [java] Caused by: org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding UTF-8).
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
>      [java] 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>      [java] 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
>      [java] 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      [java] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
>      [java] 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
>      [java] 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>      [java] 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
>      [java] 	... 2 more
>      [java] Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
>      [java] 	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
>      [java] 	... 14 more
>      [java] Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
>      [java] 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
>      [java] 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
>      [java] 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
>      [java] 	... 18 more

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