Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-18 Thread tomstark
Yeah, I was a little surprised that manipulating the MessageContentsList directly didn't confuse the underlying layers. Seemed like I might have been potentially "pulling the rug out from underneath" the lower layers. Glad it worked. As for the validation sequence, although it seems as though

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-17 Thread tomstark
Slight mod to what you have: JAXRSUtils.getCurrentMessage().setContent(List.class, new MessageContentsList(resp)); Using the "put" method did not work but the above code works just fine and I was able to see the original outbound violations in an error response. Thanks. -- View this message

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-17 Thread tomstark
Tried the BeanValidationInInterceptor and BeanValidationOutInterceptor with the the Out interceptor configured like this: BeanValidationOutInterceptor bean = new BeanValidationOutInterceptor(); bean.setProvider(new BeanValidationProvider(new HibernateBeanValidationProviderResolver()));

Re: Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread tomstark
Hi Sergey, Thanks for the info. I'll try your suggestion. Do you have a time frame for when 3.1.9 would be released? Also, can you reply with the bug number so I can track it? Depending on timing, I may have to wait to pick up the fix until our next release. Thanks. -- View this message

Using JAXRSBeanValidationOutInterceptor causes Fault when validation of an object fails

2016-10-14 Thread tomstark
I'm trying to use the JAXRSBeanValidationOutInterceptor with a customized ValidationExceptionMapper but it throws a Fault when processing instead of returning a response with the violations. Here is the scenario: When a Response is built with an entity object that has violations, the interceptor

3.0 exception mapping issue if creating base exception mapper class

2014-08-01 Thread tomstark
Hi, I am trying to upgrade from CXF 2.7.5 to 3.0.1 but ran into an issue at runtime with the exception mapping. Our mappers are something like this: (I've created the fictious classSomeError for this example) public abstract class AbstractExceptionMapperE extends Throwable implements

Re: 3.0 exception mapping issue if creating base exception mapper class

2014-08-01 Thread tomstark
Of course -- I searched for the wrong thing, posted and then saw this post. http://cxf.547215.n5.nabble.com/ExceptionMapper-choosing-the-wrong-mapper-td4775881.html#a4959271 Seems like the same issue but doesn't yet have a solution, correct? -- View this message in context:

Re: wadl2java generates invalid method names

2014-01-15 Thread tomstark
Update: It's not like the bug mentioned in the previous post since it doesn't have anything to do with a collision with java reserved names but requires the same substitution for method names that are generated based on multiple representations. -- View this message in context:

Can unordered JSON work with XML sequence with validation

2013-10-09 Thread tomstark
Hello, We have a REST API that was originally developed using XSDs with CXF 2.5.2 using XML as the payload. To make the API flexible, objects are created with a xs:any array at the end of each object to allow for backward compatibility. Here is a schema example: xs:complexType name=someType

Re: Can unordered JSON work with XML sequence with validation

2013-10-09 Thread tomstark
Hi Sergey, Answers to some of your questions: Do you mean it is not guaranteed from JSON client ? If so, do you mean that a new content covered by xsd:any can get in front of someInt ? The order of the elements from the JSON from the client is not guaranteed to match that of the schema. The

Re: how to specify default namespace in JSON

2013-06-19 Thread tomstark
Sergey, One last thing. In order to implement our own JSON namespace handling convention we needed to create an instance of the class JSONUtils.JettisonReader, providing it an XMLStreamReader instance that in turn takes as a parameter a subclass of MappedNamespaceConvention. Unfortunately the

Re: how to specify default namespace in JSON

2013-06-19 Thread tomstark
Hi Sergey, The trouble is that we are extending MappedXMLStreamReader, not DepthXMLStreamReader. MXMLSR does not take a delegate class in its constructor since it is the delegate. For our solution, we can keep track of the last namespace used for elements that don't have a namespace. It seemed

Re: how to specify default namespace in JSON

2013-06-07 Thread tomstark
I neglected to mention that I was already setting the ignoreNamespaces property to true. I was hoping that worked on input and output. Looks like it only works on input. Is that true? It only works on the output, i.e, the output JSON sequence can be affected I meant to say output --

how to specify default namespace in JSON

2013-06-06 Thread tomstark
Hi, I'm new to the forum and have only been using CXF for a short time but I don't see an answer to the current issue I am having regarding JSON, REST and namespaces. I'm using YANG to define the data model and then taking the resulting XSD and using the maven jaxb2 plugin to generate the POJOs

Re: how to specify default namespace in JSON

2013-06-06 Thread tomstark
Hi Sergey, Thanks for the quick response. I neglected to mention that I was already setting the ignoreNamespaces property to true. I was hoping that worked on input and output. Looks like it only works on input. Is that true? I see that I'm getting Jettison 1.3.1 so I'll grab 1.3.3 and try