You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Hubert zhang (JIRA)" <ji...@apache.org> on 2008/04/25 03:19:55 UTC

[jira] Created: (CXF-1548) Bug in Method handleMessage of AbstractEndpointSelectionInterceptor class

Bug in Method handleMessage of AbstractEndpointSelectionInterceptor class
-------------------------------------------------------------------------

                 Key: CXF-1548
                 URL: https://issues.apache.org/jira/browse/CXF-1548
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.3
         Environment: CXF 2.03/2.05
JDK 6
            Reporter: Hubert zhang


Please see the source code:
public void handleMessage(Message message) throws Fault {
        Exchange ex = message.getExchange();
        Set<Endpoint> endpoints =
CastUtils.cast((Set)ex.get(MultipleEndpointObserver.ENDPOINTS));

        Endpoint ep = selectEndpoint(message, endpoints);

        if (ep == null) {
            return;
        }
        ......
} 

Here if Endpoint  can not be found, just return null , it is not correct.  It should throw a SoapFault, but coz Endpoint  can not be found, then FaultObserver  also can not be accessed, it is a dead lock.

In such situation,  when you run your application, you can find such message exchanged between client and server:

Outbound Message:
--------------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Header><version xmlns="http://apache.org/
callback">789</version></soap:Header><soap:Body><callback_message
xmlns="http://apache.org/callback">z00118703</callback_message></
soap:Body></soap:Envelope>--------------------------------------

2008-4-24 17:31:59 org.apache.cxf.interceptor.LoggingInInterceptor
handleMessage
信息: Inbound Message
--------------------------------------
Headers: {transfer-encoding=[chunked], Server=[Jetty(6.1.5)]}
Message:

-------------------------------------- 

See the response message is empty,  that will cause such exception:

2008-4-25 9:19:30 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
信息: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:187)
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1948)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:157)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	at $Proxy50.serverSayHi(Unknown Source)

In common way , client should get "server does not exist " error ,but now ,it get "Unexpected EOF in prolog" error!

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