Hi Jeff, Just to explain my plan a little further: I'm building an application where the user normally interacts with the system using GWT in a browser (the most "normal" way of using GWT). But I'd also like to generate some documents (in MS-Word) using data and objects that are available in the GWT-server. There would probably be only a small number of methods that need to be available on the outside, so a very heavyweight library would be overkill.
It all boils down to: I want to execute a function in a word-macro: String GetTheTextForThisWordDocument(documentId); :-) :-) XHR sounds good, but how can I get that to work? The way I think about it I would probably need to perform the following steps: - Create an object / methods that perform the function(s) that I want to be available (the GetTheText... method mentioned above); - Use some kind of library / construction that can make that object available to the outside world (just like GWT does in its own way). Is there some kind of standard XHR library? - Somehow configure the application server (in web.xml?) to respond to a certain URL using that library (example: http://localhost:8001/WordDocumentXHR) Those last two points I've never dealt with before (and I haven't found anything googling), so any advise would be appreciated. Arian. On 8 jul, 02:26, Jeff Chimene <[email protected]> wrote: > On 07/05/2010 02:28 PM, Arian Prins wrote: > > > Hello people, > > I have a hard time figuring out what would be the best approach for my > > problem. > > > I'd like to communicate some info from the server (side logic) to an > > MS-Office macro. I could always use ODBC to let the office macro query > > the database directly but that just feels like a kludge. I've got a > > lot of objects in my application in which a lot of processing is > > already implemented. > > > So, I figure, the best way would be to create a web service (SOAP?) > > inside the gwt server-side implementation that can be queried by > > outside applications. > > > I've done a lot of searching, but haven't really found any definitive > > way that would be best. Should I use an existing RPC/SOAP/JSON library > > and try to integrate it into GWT's structure (how to configure > > web.xml? etc. etc.)? Is there something already provided by google or > > in de code projects? > > > Any thoughts and tips would be greatly appreciated. > > > Arian Prins. > > Hi Arian, > > I've written some fairly complex Office macros. > > I'm not sure where GWT fits into your application. In your case, the > client side is MS Office macros, not a browser JavaScript instance. The > server side can be whatever you wish. You will probably want to use > XMLHTTPRequests (XHR) to communicate with the server; I think SOAP is a > bit heavy-handed to implement in an Office macro. > > I doubt RPC will work for you, as the serialization logic is also a bit > much for an Office macro. > > This leaves JSON, application-specific XML (as opposed to the > generalized SOAP DTD), CSV. > > If you are planning to use the Google App Engine, I'm not sure how to > get Office macros to use Java RPC. > > I'm leaning towards the XHR solution: it's lightweight, can be tested > independently of the macro environment, and straightforward to mock > inside the macro environment. -- 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.
