cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Wang <j...@plutom.com>
Subject Long vs long...
Date Fri, 09 Dec 2011 11:10:34 GMT
I have a class with the ID as Long (I like to use null to indicate not
yet stored, as opposed to a magic-number that is defined as the
not-yet-stored number.  However, when JAXB is done serialzing it, the
type comes out as "@xsi.type":"xs:long", which, when ClientProxyImpl
tries to deserialize, comes up with the error
java.lang.IllegalArgumentException: prefix xs is not bound to a
namespace.

There are also problems passing in JSON strings as {"user" : {'id' :
5}} results in com.sun.org.apache.xerces.internal.dom.ElementNSImpl
cannot be cast to java.lang.Long.  However, PathParams and QueryParams
assign properly to types of Long.

What are the best ways to address the serialization and
deserialization problem?  I read about setting read and write xsi
boolean values in JSONProvider, How do I do that? (and if I set them
to false, what other affects could it have?

thanks
Jeff

Mime
View raw message