On Mon, Jan 19, 2009 at 9:16 AM, Simon Laws <[email protected]>wrote:
> Is anyone aware if we have example where a complex type is passed from > Javascript to and SCA component/service via the JSONRPC binding. I'm trying > and it's failing in the forward databinding. The browser reports; > > Error: uncaught exception: > org.apache.tuscany.sca.databinding.TransformationException: > com.metaparadigm.jsonrpc.UnmarshallException: class in hint not found > > So it seems that the "javaClass" value, which looks correct in my case, > appears in the JSON formatted message is confusing the binding. > > Simon > I looked at this some more today and inside of the JSONSerializer it seems to be doing a Class.forName() with the hint class. This is unlikely to lead to satisfaction as the class in the hint is in one of the application contributions. Hence it will be available on the network of contribution classloaders but I suspect this isn't the classloader that is used to load the JSON2JavaBean transformer. For the time being I've forced my incoming JSON objects to remove the javaClass hint and it works. However it maybe that non-sca clients are sending in JSON messages containing class hints. So we either have to put a notice in the docs asking people not to do this or ensure that the JSON2JavaBean transformer has access to the network of contribution classloaders. Any idea if we can do the latter? Simon
