You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by eanbiso <bi...@hotmail.it> on 2013/06/03 09:05:51 UTC

RE: WebServiceException is not propagated from Provider to the client.

Hi Dan,
I saw that almost all the time is lost between the WSS4JInInterceptor and the caught of the exception by the caller on Client side.
Seems that the exception arrives soon at the client but after the WSS4JInInterceptor there is a loss of time.
Tha stack of calls should be the following:
when the response arrives in the WSS4JInInterceptor, it prints
    LOG.warning("Request does not contain Security header, " + "but it's a fault.");
then, we arrive in the ClientImpl class
    private Object[] doInvoke(ClientCallback callback, 
                                              BindingOperationInfo oi,
                                              Object[] params,
                                              Map<String, Object> context,
                                              Exchange exchange) throws Exception {...}
and execute the:
    return processResult(message, exchange, oi, resContext);
So we arrive in the
    protected Object[] processResult(Message message,
                                   Exchange exchange,
                                   BindingOperationInfo oi,
                                   Map<String, Object> resContext) throws Exception {
and block here:
        // Wait for a response if we need to
        if (oi != null && !oi.getOperationInfo().isOneWay()) {
            synchronized (exchange) {
                waitResponse(exchange);
            }
        }
We exit from the "waitResponse" statement after more than 30 seconds with the print: 
    "Timed out waiting for response to operation"

Any suggestion?
It could be caused by the malformed message reported by the WSS4JInInterceptor?
Thanks,

Andrea 


Date: Fri, 31 May 2013 09:11:20 -0700
From: ml-node+s547215n5728595h65@n5.nabble.com
To: bisomagic@hotmail.it
Subject: Re: WebServiceException is not propagated from Provider<Source> to the client.



	
On May 31, 2013, at 11:20 AM, eanbiso <[hidden email]> wrote:


> Sorry, I was wrong:

> the exception arrives to the client but very late (with almost a minute of

> delay).

> Seems to have lost a lot of time in the chain of interceptors on the

> dispatcher.

> I try to investigate it and get more info.


Wow.  That's strange.  Sounds like a flush or close isn't being called on the output stream, but that SHOULD be the same for a regular call as for an exception case.  Strange.


Dan



> 

> Andrea

> 

> 

> 

> 

> --

> View this message in context: http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728589.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 

Daniel Kulp

[hidden email] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com



	
	
	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728595.html
	
	
		
		To unsubscribe from WebServiceException is not propagated from Provider<Source> to the client., click here.

		NAML
	 		 	   		  



--
View this message in context: http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728621.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WebServiceException is not propagated from Provider to the client.

Posted by Aki Yoshida <el...@gmail.com>.
2013/6/5 eanbiso <bi...@hotmail.it>

> Hi Aki,
> I'm using CXF 2.5.0 version for OSGI.
> The response message I receive client side contains:
>     org.apache.cxf.message.Message.RESPONSE_CODE=500
> Other ideas?
>

2.5.0 is somewhat old, but I just ran a test with a standalone cxf 2.5.0
using a provider based service throwing an exception.It is returning an
http 500 response with the soap fault message content. And this works fine
with the cxf 2.5.0 client, no blocking. Could it be that you have some
custom interceptor configured at the server side or changed the interceptor
chain?



> Thanks,
>
> Andrea
>
> Date: Wed, 5 Jun 2013 02:38:53 -0700
> From: ml-node+s547215n5728776h76@n5.nabble.com
> To: bisomagic@hotmail.it
> Subject: Re: WebServiceException is not propagated from Provider<Source>
> to the client.
>
>
>
>         2013/6/5 Aki Yoshida <[hidden email]>
>
>
> > that's strange.
>
> > Could you check what response is returned by the server?
>
> > If it is a fault response and not an empty 202 or 200 response, your
>
> > client should be marking it as finished and shouldn't wait there.
>
> >
>
>
> i wanted to mean "not an empty 200 response. ..."
>
>
>
> > I think there was an old issue where the response from the provider
>
> > service was not returned correctly under some cases.
>
> >
>
>
> the bug caused an empty 200 to be returned and this could lead to the same
>
> situation you mentioned.
>
>
>
> > So could you also provide which cxf version you are using?
>
> > regards, aki
>
> >
>
> >
>
> > 2013/6/4 eanbiso <[hidden email]>
>
> >
>
> >> The problem is that the client enters in the while cicle of the
> follofing
>
> >> method of ClientImpl class:
>
> >>
>
> >>     protected void waitResponse(Exchange exchange) {
>
> >>         int remaining = synchronousTimeout;
>
> >>         while (!Boolean.TRUE.equals(exchange.get(FINISHED)) &&
> remaining >
>
> >> 0) {
>
> >>             long start = System.currentTimeMillis();
>
> >>             try {
>
> >>                 exchange.wait(remaining);
>
> >>             } catch (InterruptedException ex) {
>
> >>                 // ignore
>
> >>             }
>
> >>             long end = System.currentTimeMillis();
>
> >>             remaining -= (int)(end - start);
>
> >>         }
>
> >>         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
>
> >>             LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
>
> >>                 exchange.get(OperationInfo.class).getName().toString());
>
> >>         }
>
> >>     }
>
> >>
>
> >> and this happens because the message received from the dispatcher, when
> an
>
> >> exception occurs, doesnt't contain the property:
>
> >>     exchange.finished=true
>
> >> Where can I set this property to avoid to wait?
>
> >> Thanks,
>
> >>
>
> >> Andrea
>
> >>
>
> >>
>
> >>
>
> >> --
>
> >> View this message in context:
>
> >>
> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728738.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.
>
> >>
>
> >
>
> >
>
>
>
>
>
>
>
>
>
>
>
>
>                 If you reply to this email, your message will be added to
> the discussion below:
>
> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728776.html
>
>
>
>                 To unsubscribe from WebServiceException is not propagated
> from Provider<Source> to the client., click here.
>
>                 NAML
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728782.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

RE: WebServiceException is not propagated from Provider to the client.

Posted by eanbiso <bi...@hotmail.it>.
Hi Aki,
I'm using CXF 2.5.0 version for OSGI.
The response message I receive client side contains:
    org.apache.cxf.message.Message.RESPONSE_CODE=500
Other ideas?
Thanks,

Andrea

Date: Wed, 5 Jun 2013 02:38:53 -0700
From: ml-node+s547215n5728776h76@n5.nabble.com
To: bisomagic@hotmail.it
Subject: Re: WebServiceException is not propagated from Provider<Source> to the client.



	2013/6/5 Aki Yoshida <[hidden email]>


> that's strange.

> Could you check what response is returned by the server?

> If it is a fault response and not an empty 202 or 200 response, your

> client should be marking it as finished and shouldn't wait there.

>


i wanted to mean "not an empty 200 response. ..."



> I think there was an old issue where the response from the provider

> service was not returned correctly under some cases.

>


the bug caused an empty 200 to be returned and this could lead to the same

situation you mentioned.



> So could you also provide which cxf version you are using?

> regards, aki

>

>

> 2013/6/4 eanbiso <[hidden email]>

>

>> The problem is that the client enters in the while cicle of the follofing

>> method of ClientImpl class:

>>

>>     protected void waitResponse(Exchange exchange) {

>>         int remaining = synchronousTimeout;

>>         while (!Boolean.TRUE.equals(exchange.get(FINISHED)) && remaining >

>> 0) {

>>             long start = System.currentTimeMillis();

>>             try {

>>                 exchange.wait(remaining);

>>             } catch (InterruptedException ex) {

>>                 // ignore

>>             }

>>             long end = System.currentTimeMillis();

>>             remaining -= (int)(end - start);

>>         }

>>         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {

>>             LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",

>>                 exchange.get(OperationInfo.class).getName().toString());

>>         }

>>     }

>>

>> and this happens because the message received from the dispatcher, when an

>> exception occurs, doesnt't contain the property:

>>     exchange.finished=true

>> Where can I set this property to avoid to wait?

>> Thanks,

>>

>> Andrea

>>

>>

>>

>> --

>> View this message in context:

>> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728738.html
>> Sent from the cxf-user mailing list archive at Nabble.com.

>>

>

>



	
	
	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728776.html
	
	
		
		To unsubscribe from WebServiceException is not propagated from Provider<Source> to the client., click here.

		NAML
	 		 	   		  



--
View this message in context: http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728782.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WebServiceException is not propagated from Provider to the client.

Posted by Aki Yoshida <el...@gmail.com>.
2013/6/5 Aki Yoshida <el...@gmail.com>

> that's strange.
> Could you check what response is returned by the server?
> If it is a fault response and not an empty 202 or 200 response, your
> client should be marking it as finished and shouldn't wait there.
>

i wanted to mean "not an empty 200 response. ..."


> I think there was an old issue where the response from the provider
> service was not returned correctly under some cases.
>

the bug caused an empty 200 to be returned and this could lead to the same
situation you mentioned.


> So could you also provide which cxf version you are using?
> regards, aki
>
>
> 2013/6/4 eanbiso <bi...@hotmail.it>
>
>> The problem is that the client enters in the while cicle of the follofing
>> method of ClientImpl class:
>>
>>     protected void waitResponse(Exchange exchange) {
>>         int remaining = synchronousTimeout;
>>         while (!Boolean.TRUE.equals(exchange.get(FINISHED)) && remaining >
>> 0) {
>>             long start = System.currentTimeMillis();
>>             try {
>>                 exchange.wait(remaining);
>>             } catch (InterruptedException ex) {
>>                 // ignore
>>             }
>>             long end = System.currentTimeMillis();
>>             remaining -= (int)(end - start);
>>         }
>>         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
>>             LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
>>                 exchange.get(OperationInfo.class).getName().toString());
>>         }
>>     }
>>
>> and this happens because the message received from the dispatcher, when an
>> exception occurs, doesnt't contain the property:
>>     exchange.finished=true
>> Where can I set this property to avoid to wait?
>> Thanks,
>>
>> Andrea
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728738.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>

Re: WebServiceException is not propagated from Provider to the client.

Posted by Aki Yoshida <el...@gmail.com>.
that's strange.
Could you check what response is returned by the server?
If it is a fault response and not an empty 202 or 200 response, your client
should be marking it as finished and shouldn't wait there.
I think there was an old issue where the response from the provider service
was not returned correctly under some cases.
So could you also provide which cxf version you are using?
regards, aki


2013/6/4 eanbiso <bi...@hotmail.it>

> The problem is that the client enters in the while cicle of the follofing
> method of ClientImpl class:
>
>     protected void waitResponse(Exchange exchange) {
>         int remaining = synchronousTimeout;
>         while (!Boolean.TRUE.equals(exchange.get(FINISHED)) && remaining >
> 0) {
>             long start = System.currentTimeMillis();
>             try {
>                 exchange.wait(remaining);
>             } catch (InterruptedException ex) {
>                 // ignore
>             }
>             long end = System.currentTimeMillis();
>             remaining -= (int)(end - start);
>         }
>         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
>             LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
>                 exchange.get(OperationInfo.class).getName().toString());
>         }
>     }
>
> and this happens because the message received from the dispatcher, when an
> exception occurs, doesnt't contain the property:
>     exchange.finished=true
> Where can I set this property to avoid to wait?
> Thanks,
>
> Andrea
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728738.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

RE: WebServiceException is not propagated from Provider to the client.

Posted by eanbiso <bi...@hotmail.it>.
The problem is that the client enters in the while cicle of the follofing
method of ClientImpl class: 

    protected void waitResponse(Exchange exchange) {
        int remaining = synchronousTimeout;
        while (!Boolean.TRUE.equals(exchange.get(FINISHED)) && remaining >
0) {
            long start = System.currentTimeMillis();
            try {
                exchange.wait(remaining);
            } catch (InterruptedException ex) {
                // ignore
            }
            long end = System.currentTimeMillis();
            remaining -= (int)(end - start);
        }
        if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
            LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
                exchange.get(OperationInfo.class).getName().toString());
        }
    }
	
and this happens because the message received from the dispatcher, when an
exception occurs, doesnt't contain the property:
    exchange.finished=true
Where can I set this property to avoid to wait?
Thanks,

Andrea



--
View this message in context: http://cxf.547215.n5.nabble.com/WebServiceException-is-not-propagated-from-Provider-Source-to-the-client-tp5728573p5728738.html
Sent from the cxf-user mailing list archive at Nabble.com.