How to transform SoapFault to SoapMessage via Interceptor in CXF?
Posted
by
Michal Mech
on Stack Overflow
See other posts from Stack Overflow
or by Michal Mech
Published on 2011-11-09T14:28:40Z
Indexed on
2011/11/19
1:51 UTC
Read the original article
Hit count: 333
I have web-service created and configured via Spring
and CXF
. See beans below:
<?xml version="1.0" encoding="UTF-8"?>
<beans <!-- ommited -->>
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="internalActService" class="package.InternalActServiceImpl" />
<jaxws:endpoint implementor="#internalActService" address="/InternalActService">
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
<jaxws:outFaultInterceptors>
<bean class="package.InternalActServiceFaultOutInterceptor" />
</jaxws:outFaultInterceptors>
</jaxws:endpoint>
</beans>
As can you see I added schema validation to my web service. But CXF
throws SoapFault
when request is not corresponding with schema.
I want to send to the client SoapMessage
instead of SoapFault
, that's why I added outFaultInterceptors
.
My question is how to transform SoapFaul
t to SoapMessage
? I've made few tries but I don't know how to implement outFaultInterceptor
.
© Stack Overflow or respective owner