You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sean O'Callaghan (JIRA)" <ji...@apache.org> on 2008/12/04 16:36:44 UTC

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

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