You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Robert Zilke (JIRA)" <ji...@apache.org> on 2019/02/07 14:29:00 UTC
[jira] [Updated] (CXF-7965) Missing StaxOutEndingInterceptor in
OutFaultInterceptorChain leads to empty response
[ https://issues.apache.org/jira/browse/CXF-7965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zilke updated CXF-7965:
------------------------------
Description:
My OutInterceptorChain looks like this:
{code:java}
...
pre-stream [SoapLoggingOutHandler, StaxOutInterceptor, XSLTOutInterceptor, AttachmentOutInterceptor]
...
marshal [WrappedOutInterceptor, ExceptionInterceptor, BareOutInterceptor]
...
pre-stream-ending [StaxOutEndingInterceptor]
...{code}
I'm using an *XSLTOutInterceptor* for XSLT transformations, which is called after the *StaxOutInterceptor*, so the *XSLTOutInterceptor* can use the *XMLStreamWriter*, provided by the *StaxOutInterceptor.*
Additionally, the *StaxOutInterceptor* puts the *StaxOutEndingInterceptor* into the interceptor chain.
This works fine if no interceptor throws an Exception in the handleMessage() method.
In my scenario, the *ExceptionInterceptor* (in phase marshal) throws a RuntimeException. My FaultOutInterceptorChain looks than like this:
{code:java}
...
pre-stream [SoapLoggingOutHandler, AttachmentOutInterceptor, StaxOutInterceptor]
...
pre-stream-ending []
...
{code}
The *StaxOutEndingInterceptor* is missing here which leads to an empty response because the *StaxOutEndingInterceptor* has to close the *XMLStreamWriter*.
My current workaround is to invoke the *XSLTOutInterceptor* before the *StaxOutInterceptor*, so the *XSLTOutInterceptor* will use the OutputStream instead of the XMLStreamWriter.
The complete interceptor chains are described in the "Environment" field.
was:
My OutInterceptorChain looks like this:
{code:java}
...
pre-stream [SoapLoggingOutHandler, StaxOutInterceptor, XSLTOutInterceptor, AttachmentOutInterceptor]
...
marshal [WrappedOutInterceptor, ExceptionInterceptor, BareOutInterceptor]
...
pre-stream-ending [StaxOutEndingInterceptor]
...{code}
I'm using an *XSLTOutInterceptor* for XSLT transformations, which is called after the *StaxOutInterceptor*, so the *XSLTOutInterceptor* can use the *XMLStreamWriter*, provided by the *StaxOutInterceptor.*
Additionally, the *StaxOutInterceptor* puts the *StaxOutEndingInterceptor* into the interceptor chain.
This works fine if no interceptor throws an Exception in the handleMessage() method.
In my scenario, the *ExceptionInterceptor* (in phase marshal) throws a RuntimeException. My FaultOutInterceptorChain looks than like this:
{code:java}
...
pre-stream [SoapLoggingOutHandler, AttachmentOutInterceptor, StaxOutInterceptor]
...
pre-stream-ending []
...
{code}
The *StaxOutEndingInterceptor* is missing here which leads to an empty response because the *StaxOutEndingInterceptor* has to close the *XMLStreamWriter*.
My current workaround is to invoke the *XSLTOutInterceptor* before the *StaxOutInterceptor*, so the *XSLTOutInterceptor* will use the OutputStream instead of the XMLStreamWriter.
> Missing StaxOutEndingInterceptor in OutFaultInterceptorChain leads to empty response
> ------------------------------------------------------------------------------------
>
> Key: CXF-7965
> URL: https://issues.apache.org/jira/browse/CXF-7965
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime, WS-* Components
> Affects Versions: 3.2.7
> Environment: Java 8
> Complete OutInterceptorChain:
> {code:java}
> setup [PolicyOutInterceptor]
> pre-logical [HolderOutInterceptor, SwAOutInterceptor, WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
> post-logical [SoapPreProtocolOutInterceptor]
> prepare-send [MessageSenderInterceptor]
> pre-stream [SoapLoggingOutHandler, StaxOutInterceptor, XSLTOutInterceptor, AttachmentOutInterceptor]
> write [SoapOutInterceptor]
> marshal [WrappedOutInterceptor, ExceptionInterceptor, BareOutInterceptor]
> write-ending [SoapOutEndingInterceptor]
> pre-stream-ending [StaxOutEndingInterceptor]
> prepare-send-ending [MessageSenderEndingInterceptor]{code}
> Complete FaultOutInterceptorChain:
> {code:java}
> setup [ServerPolicyOutFaultInterceptor]
> pre-logical [SoapHeaderOutFilterInterceptor]
> prepare-send [MessageSenderInterceptor, Soap11FaultOutInterceptor]
> pre-stream [SoapLoggingOutHandler, AttachmentOutInterceptor, StaxOutInterceptor]
> pre-protocol [WebFaultOutInterceptor]
> write [SoapOutInterceptor]
> marshal [Soap11FaultOutInterceptorInternal]
> write-ending [SoapOutEndingInterceptor]
> prepare-send-ending [MessageSenderEndingInterceptor]{code}
> Reporter: Robert Zilke
> Priority: Major
>
> My OutInterceptorChain looks like this:
>
> {code:java}
> ...
> pre-stream [SoapLoggingOutHandler, StaxOutInterceptor, XSLTOutInterceptor, AttachmentOutInterceptor]
> ...
> marshal [WrappedOutInterceptor, ExceptionInterceptor, BareOutInterceptor]
> ...
> pre-stream-ending [StaxOutEndingInterceptor]
> ...{code}
> I'm using an *XSLTOutInterceptor* for XSLT transformations, which is called after the *StaxOutInterceptor*, so the *XSLTOutInterceptor* can use the *XMLStreamWriter*, provided by the *StaxOutInterceptor.*
> Additionally, the *StaxOutInterceptor* puts the *StaxOutEndingInterceptor* into the interceptor chain.
> This works fine if no interceptor throws an Exception in the handleMessage() method.
> In my scenario, the *ExceptionInterceptor* (in phase marshal) throws a RuntimeException. My FaultOutInterceptorChain looks than like this:
>
> {code:java}
> ...
> pre-stream [SoapLoggingOutHandler, AttachmentOutInterceptor, StaxOutInterceptor]
> ...
> pre-stream-ending []
> ...
> {code}
>
> The *StaxOutEndingInterceptor* is missing here which leads to an empty response because the *StaxOutEndingInterceptor* has to close the *XMLStreamWriter*.
> My current workaround is to invoke the *XSLTOutInterceptor* before the *StaxOutInterceptor*, so the *XSLTOutInterceptor* will use the OutputStream instead of the XMLStreamWriter.
> The complete interceptor chains are described in the "Environment" field.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)