Hi
I need to return an object in a view (an ObjectOutputStream, for example).
Is this possible ? How ?
Thanks in advance
C
Printable View
Hi
I need to return an object in a view (an ObjectOutputStream, for example).
Is this possible ? How ?
Thanks in advance
C
Can you elaborate on what you're trying to do? What's in the ObjectOutputStream?
If you want to build your own view, just subclass org.springframework.web.servlet.view.AbstractView, and then in your controller do something like this:
Map myModel = new HashMap();
myModel.put("blah", "xyz");
return new ModelAndView(new MyView(myObjectOutputStream), myModel);
You might need to explain what you're doing a bit more.
Thanks for your reply.Quote:
Originally Posted by gmatthews
My application will do the following:
1 - Retrieve some data from a DB
2 - Create a model with this data
3 - Send it as an object stream
This will be retrieved by a desktop application using a rpc axis webservice call.
I' m now using webflow to process the request and as webflow use modelandevents I wonder how can I do what you told me....
C
If you're calling it via Axis then you don't need to (shouldn't) create a serialized object. SOAP handles the serialization/de-serialization for you. The problem with ObjectOutputStream is that if your users on the desktop have a different JVM version than your server then they may not be able to read the stream. SOAP handles that for you transparently.Quote:
Originally Posted by cacho
You should just be able to send the HashMap via SOAP without serializing it manually first.
Bob