There are currently the following open issues in JIRA relating to exception handling in Seam Remoting:
Unfortunately they have been pushed to the back-burner temporarily while I work on enhancements to security, however remoting will be receiving more attention after the current security work is complete. Please feel free to add comments to these issues in JIRA (JBSEAM-633 is most relevant I'd say) if you have specific requirements or implementation ideas.
Thanks Shane. 633 seems similar. I'll have some feedback that I'll post on JIRA.
check out http://ntispace.blogspot.com/
There's a posting about remoting exceptions. Not my blog, some French guy, but I got the proxy stuff from it and it works fine, also no JSON stuff since remoting returns js objects.
thanks for the link. I have seen this and based my proxy on it slightly. His solution was geared towards grids. You actually can return JSON. I'm using a POJO Action and its @WebRemote method returns a String that is actually Json. It works quite well.
Isn't seam wrapping the result in xml first ??
Yes Seam uses an XML envelope for the exchange, both request and response. A typical response is something like:
<envelope> <header> <context> <conversationId>8</conversationId> </context> </header> <body> <result id="0"> <value> <str>%7Bdata...</str>
The Seam Component proxy only passes the content of the
str element to my callback. This content is valid Json.
So the server-side architecture is simple. I have a POJO Action backed by a SLSB. The POJO exposes a @WebRemote method that returns a String. When the event (request) is received the domain objs are fetched from the SLSB. Subsequently the POJO Action translates and returns the domain objs into a Json formatted String.
Here's an explanation of the client-side artifacts that provide the integration glue with Ext: http://mcdconsultingllc.com/node/18.
Note: I'm still working on this but it loads the client-side stores prefectly. I need to work on the param passing integration next. It works fine when the Seam component exposes a method without args.
Well I just don't get the part to translate it to json first, what's the advantage ?
Having seam converting my objects works way better for me (although the json string could be smaller without all the xml tags but I don't think thats much of a issue)
Together with a colleague were also gonna check out the seam-ext integration possibilities. So good to see even more people looking in to it.
This is just the first step. The proxy is the core to the solution so I figured this was the best way to start off. The advantage is Ext natively supports Json, ie I only needed to focus on the Proxy not a custom reader to support bean to JS serialization to Ext record creation.
I just wanted something simple to start with and Json fit that need. Once this is working well I plan to introduce a custom Ext.data.DataReader so the solution would be more 'Seam-like'.
Speaking of integration this is only part of the picture, integration of Ext store backed widgets. The Ext form stuff introduces it's own Json protocol and the Actions are very much coupled to the traditional ajax model.