Hi Francesco
On 23/07/13 08:55, Francesco Chicchiriccò wrote:
Hi Sergey,
with your latest fix things work much better but still not completely.
Good news,
Basically, with CXF 2.7.7-SNAPSHOT (and @JsonTypeInfo in
AbstractSchemaTO) Jackson is able to handle List<T> as in
<T extends AbstractSchemaTO> List<T> list()
but unfortunately not
<T extends AbstractSchemaTO> T read()
Any idea?
Did you mean the other way around ? The latter option is being tested in
CXF (except that a test 'Book' class is instead of 'AbstractSchemaTO'),
but I've no a test for the
'<T extends AbstractSchemaTO> List<T> list()' option, I'll check
Thanks again for your priceless support.
You are too kind :-), thanks a mill for stressing the client runtime...
Cheers, Sergey
Regards.
On 22/07/2013 16:04, Sergey Beryozkin wrote:
Sorry for a noise, you were right :-), I was somehow expecting to
login first. Now I'm able to commit
Cheers, Sergey
On 22/07/13 13:35, Sergey Beryozkin wrote:
Hi, does not work for me right now, looks like it is a bit late at this
stage, I guess I'll wait a bit :-)
Thanks for a tip anyway
Cheers, Sergey
On 22/07/13 13:27, Francesco Chicchiriccò wrote:
On 22/07/2013 14:26, Sergey Beryozkin wrote:
On 22/07/13 13:21, Francesco Chicchiriccò wrote:
On 22/07/2013 14:12, Sergey Beryozkin wrote:
Hi Francesco,
I'm realizing I've typed a lot of nonsense to do with typed proxies
:-), the underlying issue is to do with the proxy implementation not
unwrapping TypeVariable.
The fix will go in as soon as the current Apache LDAP issues get
resolved.
OT: resetting your password via https://id.apache.org should fix.
Useful to know, thanks. May be I'll wait a bit longer though, it took
me awhile to memorize my current password :-)
This morning I've reset with the same old value :-)
Note though, you'd still need to add @JsonTypeInfo to
AbstractSchemaTO
if you need to access the specific subtype's info in the client
code,
otherwise Jackson will not be able to create subtype instances from
the payload.
Understood.
Regards.
On 19/07/13 09:26, Francesco Chicchiriccò wrote:
On 18/07/2013 23:44, Andrei Shakirin wrote:
Hi Francesco,
I am not 100% sure that is a solution for your case, but I have
used
Jackson specific annotation in AbstractSchemaTO:
@JsonTypeInfo(use=Id.CLASS, include=As.PROPERTY,
property="class").
Annotation is currently deactivated, because it causes conflicts
with
Syncope Spring MVC Rest implementation.
The annotation forces client to send concrete class name in JSON
representation, as a result service has more information to
construct
concrete class.
As I can remember, I have tested this code for JSON using CXF
JAX-RS
client and service.
Could you try to activate it and retest?
Hi Andrei,
when adding such Jackson annotation to AbstractSchemaTO, the JSON
payload actually adds the expected attribute:
{
"class": "org.apache.syncope.common.to.SchemaTO",
"name": "fullname",
"type": "String",
"mandatoryCondition": "true",
"enumerationValues": null,
"enumerationKeys": null,
"multivalue": false,
"uniqueConstraint": true,
"readonly": false,
"conversionPattern": null,
"validatorClass": null
}
However, this still generates the (same) exception:
java.lang.ClassCastException: java.util.LinkedHashMap cannot be
cast to
org.apache.syncope.common.to.AbstractSchemaTO
BTW, I have verified via debug that in ProviderBase (ancestor of
JacksonJaxbJsonProvider), the method readFrom() is invoked with
parameters
Class<Object> type => class
org.apache.syncope.common.to.AbstractSchemaTO
Type genericType => T, with name
""org.apache.syncope.common.to.AbstractSchemaTO"
Regards.