Hi
Is it happening for valid messages too ?
I think in 2.1.3 JAXBProvider will now correctly throw
WebApplicationExceptions, wrapping the original exception,
so one option is to do MyExceptionMapper<WebApplicationException> and register it as
a provider in <jaxrs:providers>.
That said, I'll also update JAXBProvider to have a more useful message and possibly a better HTTP status code when validation errors
occur.
Cheers, Sergey
----- Original Message -----
From: "Miller, David" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 13, 2008 12:59 AM
Subject: restful service schema validation
Hi
I'm trying to get schema validation in JAX-RS restful services.
Posting to the service without the schema validation works fine, the
service receives a jaxb unmarshalled object.
But If I add the schema info like below, posting to the services returns
http status 500 with no log messages being created on the server.
How do I see what is going wrong, or handle errors with a interceptor or
exception mapper ?
<jaxrs:server ...
</jaxrs:providers>
<ref bean="jaxbProvider"/>
</jaxrs:providers>
</jaxrs:server>
<bean id="jaxbProvider"
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="schemas">
<list>
<value>classpath:/Service.xsd</value>
</list>
</property>
</bean>
***********************************************************************************************
This message and its attachments may contain legally privileged or confidential
information.
It is intended solely for the named addressee. If you are not the addressee
indicated in this
message or responsible for delivery of the message to the addressee, you may
not copy or deliver
this message or its attachments to anyone. Rather, you should permanently
delete this message
and its attachments and kindly notify the sender by reply e-mail. Any content
of this message
and its attachments which does not relate to the official business of the
sending company must
be taken not to have been sent or endorsed by that company or any of its
related entities. No
warranty is made that the e-mail or attachments are free from computer virus or
other defect.
***********************************************************************************************