Sending a file via XML RPC

Hi all,

I'm trying to send a file via XML RPC ..... the below code doesn't
work (some HTTP error) and I cant find any samples anywhere on Google
.... can someone shed some light?

@server = XMLRPC::Client.new2("http://" + @loginName.to_s + ":" +
@password.to_s + "@" + SITE_URL + "/")
file = IO.read("files/something.txt")
result = @server.call("submitFile", "first parameter" , "yada yada", file )

e deleflie wrote:

Hi all,

I'm trying to send a file via XML RPC ..... the below code doesn't
work (some HTTP error) and I cant find any samples anywhere on Google
.... can someone shed some light?

And what would that error be?

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ - You know you've been hacking too long when...
...in a dream, you are walking down a path (using PostScript's pathforall)
and get woken up by a closepath.

e deleflie wrote:
> Hi all,
>
> I'm trying to send a file via XML RPC ..... the below code doesn't
> work (some HTTP error) and I cant find any samples anywhere on Google
> .... can someone shed some light?

And what would that error be?

HTTP-Error: 500 Internal Server Error

I suspect that the error is irrelevant, because I have no idea how to
pass a file in an XML RPC request .... and the error was generated
from a wild guess (which is the code repeated below).

@server = XMLRPC::Client.new2("http://" + @loginName.to_s + ":" +
@password.to_s + "@" + SITE_URL + "/")
file = IO.read("files/something.txt")
result = @server.call("submitFile", "first parameter" , "yada yada", file )

Etienne

e deleflie wrote:

e deleflie wrote:
> Hi all,
>
> I'm trying to send a file via XML RPC ..... the below code doesn't
> work (some HTTP error) and I cant find any samples anywhere on Google
> .... can someone shed some light?

And what would that error be?

HTTP-Error: 500 Internal Server Error

This is somewhat of a generic, catch-all error. Usually means that the
server isn't configured properly, or has troubles connecting to a
database or somesuch thing.

If you have access to the server, you could check its logs.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

Watch out for off-by-one errors.
~ - The Elements of Programming Style (Kernighan & Plaugher)