Hi All,

Since *setContent* method in the resource accepts *Object *type as the
value, I've set HashMap directly in the resource and put it in the registry
as follows

Resource orderRes = registry.newResource();
> orderRes.setContent(orders);
> registry.put("orders_location", orderRes);


But when I debug and check the content of the above registry key it is null.
I was able to save and retrieve from the registry without any issues, after
serializing the HashMap and put it as the content.

It would be great if someone can tell why should we serialize the object
when putting in resource
Is there any other way to put the object in resource without serializing?
e.g
Can we use *setMediaType* of the resource and put directly


Best Regards
/Thusitha
-- 
Thusitha Dayaratne
Software Engineer | WSO2 Inc

Email    [email protected]
Mobile  +94712756809
Blog      alokayasoya.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to