Hmmm strange - we have deployed the ws to a Wildfly 8 container and exclude the 
webservices subsystem - but still the same error :-( Is the idea to manipulate 
with the XMLStreamWriter and generate parts of a soapfault or just to throw 
exceptions and let cxf handle it ? We have a lot of other cxf webservices that 
works great.

Regarding the svn link - it’s copied directly from the documentation 
(http://cxf.apache.org/docs/interceptors.html 
<http://cxf.apache.org/docs/interceptors.html>) - "Writing and configuring an 
Interceptor”.

Regards
Aage

On 2018/06/11 09:40:54, Colm O hEigeartaigh <[email protected]> wrote:
> If I modify the configuration_interceptor demo in that way I just get a NPE:>
>
> java.lang.NullPointerException>
>     at>
> java.util.zip.DeflaterOutputStream.<init>(DeflaterOutputStream.java:84)>
>
> --->
> a/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java>
> +++>
> b/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java>
> @@ -56,7 +56,7 @@ public class StreamInterceptor extends>
> AbstractPhaseInterceptor<Message> {>
>                  cs.flush();>
>                  CachedOutputStream csnew = (CachedOutputStream) message>
>                      .getContent(OutputStream.class);>
> -                GZIPOutputStream zipOutput = new GZIPOutputStream(os);>
> +                GZIPOutputStream zipOutput = new GZIPOutputStream(null);>
>
> You linked to configuration_interceptor in SVN above - that is no longer>
> maintained, the CXF source is now in git for several years.>
>
> Colm.>
>
> On Fri, Jun 8, 2018 at 6:18 AM, Aage Nielsen <[email protected]> wrote:>
>
> > We are struggling with fault handling on an outgoing interceptor. We keep>
> > getting>
> >>
> > Caused by: javax.xml.stream.XMLStreamException: No open start element, when 
> > trying to write end element>
> >     at 
> > com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1584)
> >  [woodstox-core-5.0.3.jar:5.0.3]>
> >     at 
> > com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1613)
> >  [woodstox-core-5.0.3.jar:5.0.3]>
> >     at 
> > com.ctc.wstx.sw.BaseNsStreamWriter.doWriteEndTag(BaseNsStreamWriter.java:664)
> >  [woodstox-core-5.0.3.jar:5.0.3]>
> >     at 
> > com.ctc.wstx.sw.BaseNsStreamWriter.writeEndElement(BaseNsStreamWriter.java:291)
> >  [woodstox-core-5.0.3.jar:5.0.3]>
> >     at 
> > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:304)
> >  [cxf-rt-bindings-soap-3.2.4.jar:3.2.4]>
> >>
> > When throwing a soapfault from inside our code. We have tried using the>
> > cxf demo sample (configuration_interceptor>
> > <http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/configuration_interceptor/>)>
> > and if we change the>
> >>
> > GZIPOutputStream zipOutput = new GZIPOutputStream(os);>
> >>
> > to>
> >>
> > GZIPOutputStream zipOutput = new GZIPOutputStream(null);>
> >>
> > a soapfault is thrown but fails with the XMLStreamException - any clue>
> > would be appreciated.>
> >>
> > Venlig hilsen / Best Regards>
> >>
> >>
> > Aage Nielsen>
> >>
> >>
> >>
> >>
> >>
> > *Openminds*>
> > Fredens Torv 1B>
> > <https://maps.google.com/?q=Fredens+Torv+1B&entry=gmail&source=g>, 1.>
> > DK-8000 Aarhus C>
> > Denmark>
> > Cvr; 33647166>
> > M: +45 5390 1639>
> > E: [email protected]>
> > www.openminds.dk>
> >>
> >>
> >>
>
>
> -- >
> Colm O hEigeartaigh>
>
> Talend Community Coder>
> http://coders.talend.com>
>

Venlig hilsen / Best Regards


Aage Nielsen





Openminds
Fredens Torv 1B, 1.
DK-8000 Aarhus C
Denmark
Cvr; 33647166
M: +45 5390 1639
E: [email protected] <mailto:[email protected]>
www.openminds.dk <http://www.openminds.dk/>


Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to