cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouble <r.ou...@gmail.com>
Subject Re: CXF backwards compatibility of datatypes
Date Wed, 04 Jan 2012 15:57:35 GMT
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.ouble@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 <dkulp@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
>>

Mime
View raw message