L
Luke Kanies
Hi all,
This is an addendum to my earlier thread about web services and ruby,
wherein I was forced to accept the inevitability of using threads.
I've successfully got my client and server talking to each other for
small tasks, but I'm trying to expand to being able to pass (sometimes
large) files around and I've run into what seems almost like a
fundamental problem.
Basically, I'm trying to send a file over the wire, and for files above
about 20k in size I get an indefinite hang.
I've tried this with soap4r and webrick (I initially thought it was a
problem passing binary around, because the binary files I was testing
were the bigger ones), and I just implemented the same functionality in
xmlrpc and its own builtin server. In both cases, I get basically the
same behaviour: Smaller files go over just fine, larger files hang
indefinitely on a 'write' call:
write(4, "<?xml version=\"1.0\" ?><methodCal"..., 1389384
I've verified that I'm depending on essentially none of the same
libraries in my two implementations (other than builtin classes, of
course), yet I get the same behaviour in both cases.
Anyone have any ideas?
I'm currently actually passing the file contents as an argument to the
method call; should I instead somehow attach the file somehow? Is there
an accepted way to pass files around in XML that I don't know about?
Any help would be greatly appreciated.
This is an addendum to my earlier thread about web services and ruby,
wherein I was forced to accept the inevitability of using threads.
I've successfully got my client and server talking to each other for
small tasks, but I'm trying to expand to being able to pass (sometimes
large) files around and I've run into what seems almost like a
fundamental problem.
Basically, I'm trying to send a file over the wire, and for files above
about 20k in size I get an indefinite hang.
I've tried this with soap4r and webrick (I initially thought it was a
problem passing binary around, because the binary files I was testing
were the bigger ones), and I just implemented the same functionality in
xmlrpc and its own builtin server. In both cases, I get basically the
same behaviour: Smaller files go over just fine, larger files hang
indefinitely on a 'write' call:
write(4, "<?xml version=\"1.0\" ?><methodCal"..., 1389384
I've verified that I'm depending on essentially none of the same
libraries in my two implementations (other than builtin classes, of
course), yet I get the same behaviour in both cases.
Anyone have any ideas?
I'm currently actually passing the file contents as an argument to the
method call; should I instead somehow attach the file somehow? Is there
an accepted way to pass files around in XML that I don't know about?
Any help would be greatly appreciated.