File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Send HTTP Response with XML schema?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Send HTTP Response with XML schema?? " Watch "Send HTTP Response with XML schema?? " New topic
Author

Send HTTP Response with XML schema??

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Mar 05, 2010
Posts: 121
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...

 
Consider Paul's rocket mass heater.
 
subject: Send HTTP Response with XML schema??
 
Similar Threads
Do I need a separate Web Client?
Missing CharacterEncodingFilter, UrlRewriteFilter?
Mule standalone: Failed to read schema document "AMQP issue"
How to do both?