On Fri, Feb 25, 2011 at 9:28 AM, ialexei <[email protected]> wrote:

> I have a legacy middleware application that returns back XML.
> It has lots of methods and is doing well in a stable production
> environment.
> I would like my GWT app (running on a different domain) to consume
> this data with minimal changes to the middleware.
>
> The way I see it I have these 2 options
> 1. Modify my middleware to return back JSONP instead of XML with an
> optional argument for return type.
> 2. Proxy calls to the middleware through a GWT servlet
>
> #1 would mean a change to every remote method call into equivalent
> JSONP.
> #2 would mean an additional hop
>

GWT is Javascript executing in a browser context. Just as, for example,
Firefox can download and render an XML file, so too can your app. I don't
know the mechanics of the request, but it sounds like it's a CGI contract
(as opposed to Java RPC): your middleware app will set the response MIME
type to "text/XML", your response handler will receive the response, if the
status is HTTP 200, it will parse the response via the browser.

You then navigate the resulting DOM tree and extract the relevant
tags/attributes/content.

hth,
jec

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to