Re: Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Marcel Stör
On 29.11.17 14:37, Sergey Beryozkin wrote: > Right, the transform feature is not meant to replace XSLT, it would be > much faster for straightforward transforms at the element > structure/namespace level but it's not a good fit for the complex > transformations... Indeed, we'd need something like

Re: Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Sergey Beryozkin
Right, the transform feature is not meant to replace XSLT, it would be much faster for straightforward transforms at the element structure/namespace level but it's not a good fit for the complex transformations... Note if all of these arbitrary simple elements are united by a namespace which

Re: Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Marcel Stör
I think either of us doesn't understand ;-) Since the service provider essentially replaced the SOAP string type with its own 'StringType' simple type that "VEMPTY" text content can appear in any element. Hence, I need to globally replace that text in every SOAP message - regardless of which XML

Re: Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Sergey Beryozkin
Or may be "{http://bar}a;, "{http://bar}a= " or similar, please experiment. XSLTFeature should def work though... On 29/11/17 13:22, Sergey Beryozkin wrote: You should be able to replace it:

Re: Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Sergey Beryozkin
You should be able to replace it: https://github.com/apache/cxf/blob/master/core/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java#L56 and https://github.com/apache/cxf/blob/master/core/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java#L73

Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread nino martinez wael
Cool thanks a lot:) On Wed, Nov 29, 2017 at 2:03 PM, Sergey Beryozkin wrote: > It has an optional addMessageToResponse property, > > and you can always customize, example, as David suggested, create your own > mapper, may be it will just extend ValidationExceptionMapper

Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread Sergey Beryozkin
It has an optional addMessageToResponse property, and you can always customize, example, as David suggested, create your own mapper, may be it will just extend ValidationExceptionMapper and set its addMessageToResponse to true, etc Cheers, Sergey On 29/11/17 09:17, nino martinez wael wrote:

[ANNOUNCE] Apache CXF 3.0.16 released

2017-11-29 Thread Colm O hEigeartaigh
Apache CXF™ is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS

Transformation interceptor to replace arbitrary text content

2017-11-29 Thread Marcel Stör
We're consuming SOAP messages for which the string type was extended or redefined (see at the bottom). To denote null/empty values the XML element uses "VEMPTY" as text content. Example: VEMPTY Before the message is deserialized and mapped to the Java model we'd like to transform "VEMPTY" to "".

Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread nino martinez wael
I would think that was exactly what org.apache.cxf.jaxrs.validation.ValidationExceptionMapper did? regards Nino On Wed, Nov 29, 2017 at 9:10 AM, David Karlsen wrote: > You could maybe implement an ExceptionMapper to handle them and transform > over to the wanted output

Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread David Karlsen
You could maybe implement an ExceptionMapper to handle them and transform over to the wanted output format: https://docs.oracle.com/javaee/7/api/javax/ws/rs/ext/ExceptionMapper.html https://dennis-xlc.gitbooks.io/restful-java-with-jax-rs-2-0-2rd-edition/en/part1/chapter7/exception_handling.html