IntelliJ Java IDE
The moose likes Spring and the fly likes Using Spring 3 to marshal XML containing local file paths into InputStream/byte[]/etc Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Using Spring 3 to marshal XML containing local file paths into InputStream/byte[]/etc" Watch "Using Spring 3 to marshal XML containing local file paths into InputStream/byte[]/etc" New topic
Author

Using Spring 3 to marshal XML containing local file paths into InputStream/byte[]/etc

Nick Stevenson
Greenhorn

Joined: Jan 25, 2012
Posts: 1
Hello,

Let me start off by saying, I'm not sure if what I'm asking is even possible. Currently, I'm using Spring 3 with a JAXB marshaller to back a small web services project. How it works now is we will send XML requests to the server (using Rest Client for Firefox), which converts the XML into Java objects using custom annotated domain classes, which then get mapped to a specific controllers for further processing. I've now encountered a scenario in which we will want to use this for wrapping a local file for processing on the server (for ease of use and so outside users don't have to worry about any specific implementations). Ideally, I'd like the request to look like :

This would ideally automatically marshal the request into a domain object that looked something like :

I've tried researching how other people have done this, but short of creating a form (which is not an option, unfortunately), or putting the file contents in the request payload itself (something I'm reluctant to do, as client files can sometimes be well over 10GB), I haven't been able to find a solution.

Is what I'm asking for technically possible? Any suggestions or guidance would be of great help.
 
 
subject: Using Spring 3 to marshal XML containing local file paths into InputStream/byte[]/etc
 
Threads others viewed
PC Connected to Internet and Internet Connectivity?
Facade design pattern in web services
Uploading Image from Java Desktop App to Server
help needed to answers sample questions
Intercepting XML using Servlet Filter
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture