[jira] [Commented] (CXF-5629) In robust one-way fault the fault message is written twice

2014-03-20 Thread Grzegorz Grzybek (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941686#comment-13941686
 ] 

Grzegorz Grzybek commented on CXF-5629:
---

I'm not sure whether exceptions from one-way robust exchages should be pure 
{{WebServiceException}} or {{SOAPFaultException}} if they contain real 
soap-fault...

> In robust one-way fault the fault message is written twice
> --
>
> Key: CXF-5629
> URL: https://issues.apache.org/jira/browse/CXF-5629
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.0.0
>Reporter: Grzegorz Grzybek
>
> I have robust one-way operation. However the resulting soap fault is not 
> written to response, because the output stream is closed, as the same 
> {{faultObserver}} is called twice:
> 1. in {{org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Message)}}:
> {code:java}
> boolean isOneWay = false;
> if (message.getExchange() != null) {
> if (message.getContent(Exception.class) != null) {
> message.getExchange().put(Exception.class, ex2);
> }
> isOneWay = message.getExchange().isOneWay() 
> && 
> !MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY));
> }
> if (faultObserver != null && !isOneWay) {
> faultObserver.onMessage(message);
> }
> {code}
> 2. later in 
> {{org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(Message)}}:
> {code:java}
> if (message.getContent(Exception.class) != null) {
> // return the fault over the response fault channel
> MessageObserver faultObserver = chain.getFaultObserver();
> if (faultObserver != null) {
> message.getExchange().setOneWay(false);
> faultObserver.onMessage(message);
> } 
> return;
> }
> {code}
> However, exchage is one-way only in second call, but the soap fault has no 
> change to get to client (output stream is closed).
> I'm working on a patch



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CXF-5629) In robust one-way fault the fault message is written twice

2014-03-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941754#comment-13941754
 ] 

ASF GitHub Bot commented on CXF-5629:
-

GitHub user grgrzybek opened a pull request:

https://github.com/apache/cxf/pull/1

[CXF-5629] Do not try to write twice to output stream in robust one-way



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/grgrzybek/cxf CXF-5629

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cxf/pull/1.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1


commit 4199bf1c6cafedca459603cdc136c7d805226fc5
Author: Grzegorz Grzybek 
Date:   2014-03-20T13:52:05Z

[CXF-5629] Do not try to write twice to output stream in robust one-way




> In robust one-way fault the fault message is written twice
> --
>
> Key: CXF-5629
> URL: https://issues.apache.org/jira/browse/CXF-5629
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.0.0
>Reporter: Grzegorz Grzybek
>
> I have robust one-way operation. However the resulting soap fault is not 
> written to response, because the output stream is closed, as the same 
> {{faultObserver}} is called twice:
> 1. in {{org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Message)}}:
> {code:java}
> boolean isOneWay = false;
> if (message.getExchange() != null) {
> if (message.getContent(Exception.class) != null) {
> message.getExchange().put(Exception.class, ex2);
> }
> isOneWay = message.getExchange().isOneWay() 
> && 
> !MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY));
> }
> if (faultObserver != null && !isOneWay) {
> faultObserver.onMessage(message);
> }
> {code}
> 2. later in 
> {{org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(Message)}}:
> {code:java}
> if (message.getContent(Exception.class) != null) {
> // return the fault over the response fault channel
> MessageObserver faultObserver = chain.getFaultObserver();
> if (faultObserver != null) {
> message.getExchange().setOneWay(false);
> faultObserver.onMessage(message);
> } 
> return;
> }
> {code}
> However, exchage is one-way only in second call, but the soap fault has no 
> change to get to client (output stream is closed).
> I'm working on a patch



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CXF-5629) In robust one-way fault the fault message is written twice

2014-03-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942226#comment-13942226
 ] 

ASF GitHub Bot commented on CXF-5629:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/1


> In robust one-way fault the fault message is written twice
> --
>
> Key: CXF-5629
> URL: https://issues.apache.org/jira/browse/CXF-5629
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.0.0
>Reporter: Grzegorz Grzybek
> Attachments: CXF-5629-2.7.x.patch, CXF-5629.patch
>
>
> I have robust one-way operation. However the resulting soap fault is not 
> written to response, because the output stream is closed, as the same 
> {{faultObserver}} is called twice:
> 1. in {{org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Message)}}:
> {code:java}
> boolean isOneWay = false;
> if (message.getExchange() != null) {
> if (message.getContent(Exception.class) != null) {
> message.getExchange().put(Exception.class, ex2);
> }
> isOneWay = message.getExchange().isOneWay() 
> && 
> !MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY));
> }
> if (faultObserver != null && !isOneWay) {
> faultObserver.onMessage(message);
> }
> {code}
> 2. later in 
> {{org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(Message)}}:
> {code:java}
> if (message.getContent(Exception.class) != null) {
> // return the fault over the response fault channel
> MessageObserver faultObserver = chain.getFaultObserver();
> if (faultObserver != null) {
> message.getExchange().setOneWay(false);
> faultObserver.onMessage(message);
> } 
> return;
> }
> {code}
> However, exchage is one-way only in second call, but the soap fault has no 
> change to get to client (output stream is closed).
> I'm working on a patch



--
This message was sent by Atlassian JIRA
(v6.2#6252)