aspose file tools*
The moose likes Web Services and the fly likes Serializing Iterators? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Serializing Iterators?" Watch "Serializing Iterators?" New topic
Author

Serializing Iterators?

Nick Head
Greenhorn

Joined: May 10, 2002
Posts: 2
Just got this error message from my client code:
No Serializer found to serialize 'java.util.Iterator'
I noticed that Iterator is not one of the datatypes that has a built-in serializer. So does anyone have any good ideas of how to do this?
Hopefully it won't involve having to write a custom serializer...
Cheers
Nick
[ May 10, 2002: Message edited by: Nick Head ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
There is a good reason - Iterator is an interface. You need to redesign your application so it doesn't try to serialize an Iterator. Maybe send an array or a Vector?
Bill


Java Resources at www.wbrogden.com
Nick Head
Greenhorn

Joined: May 10, 2002
Posts: 2
duh...
thanks for that
I was trying to use a BeanSerializer, and as it is out of the question to modify the application, looks like I'll have to write a custom serializer after all.
[ May 12, 2002: Message edited by: Nick Head ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serializing Iterators?
 
Similar Threads
dilettante
File into object stream
Another name for this language....
Can't return an Element in an RPC (despite having read the documentation)
Is This Valid JSON?