• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send HTTP Response with XML schema??

 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I ran the Petclinic sample project successfully but I am not sure if it has what I was looking for as a sample.

In Petclinic, MVC is in force. The RequestMapping actions map to model and rendered by Views (*.jsp). What I need to do is to 'intercept' the HTTP Request before or after rendering to View to compose a HTTP Response message with a XML scheme of the model and send it to a mobile client.

My mobile client accepts HTTP message with a XML schema of the returned data from my model and display it via an iPhone App.

How can I and where shall I compose this message and send it to my requesting mobile client?

Any help would be greatly appreciated. Any sample code or references that I should read will greatly help as well.

Many Thanks in advance.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Intercept it where? Why not just expose the functionality as a service and return a domain model serialized to XML? Or generate XML via the JSP.
 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear David,

Thank you for the info. I shall do so as suggested.

However, I am not exactly sure how to do it. Is there sample code base doing this that you can point me to use as template?

I must do this quickly and hope very much to have a template that I can follow.

Any extra info will be greatly appreciated.

Many Thanks...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic