You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by rouble <r....@gmail.com> on 2012/01/04 16:57:35 UTC
Re: CXF backwards compatibility of datatypes
FYI, The following worked for me in the service's spring xml configuration.
<jaxws:endpoint id="foo" address="/foo">
<jaxws:implementor>
<ref bean="fooImpl" />
</jaxws:implementor>
<jaxws:properties>
<entry key="set-jaxb-validation-event-handler"
value="false" /> <!-- needed for backwards compatibilty -->
</jaxws:properties>
</jaxws:endpoint>
However, it does make me wonder if this should be the default behavior of cxf.
tia,
rouble
On Thu, Dec 1, 2011 at 5:41 PM, rouble <r....@gmail.com> wrote:
> Hi Daniel,
>
> Thanks for that update. And where do you specify this flag:
> set-jaxb-validation-event-handler , false
>
> tia,
> rouble
>
> On Thu, Dec 1, 2011 at 5:14 PM, Daniel Kulp <dk...@apache.org> wrote:
>> On Thursday, December 01, 2011 5:06:26 PM rouble wrote:
>>> CXF Gurus,
>>>
>>> If the client is older than the service, and sends in an attribute
>>> that has been removed from a data type in the service. Spring/CXF/JAXB
>>> throws an exception:
>>> Caused by: javax.xml.bind.UnmarshalException: unexpected element ...
>>> The recommended way to handle this on stackoverflow seems to be:
>>>
>>>
>>> http://whileonefork.blogspot.com/2010/11/cxf-backwards-compatibility-adding
>>> .html
>>>
>>> But, like the original poster says, "Kind of lame to have to do really. ".
>>>
>>> Is there a standard way to do this in CXF?
>>
>> Well, the easier thing to do is to set:
>> set-jaxb-validation-event-handler , false
>>
>> instead of writing a full ValidationEventHandler. That will cause JAXB to
>> completely ignore anything it doesn't expect to see.
>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>>