Consider the following code (setters and getter not shown):
Serialization and deserialization works fine with XML. With JSON serialization works but deserialization fails because of "SAXParseException2: Unable to create an instance of test.Item".
It seems in com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader.parseXsiType the matching is done by calling att.getIndex(String uri, String localName) with values "http://www.w3.org/2001/XMLSchema-instance" and "type". The values which would match would be ("", "type").
If during debugging the value of index returned by getIndex is corrected manually, everything works fine.
I tested also with GF 4.0-b57 but there even the serialization doesn't work. It results in MessageBodyProviderNotFoundException.