sending a file via XML RPC

E

e deleflie

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 )
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf5WEMACgkQbtAgaoJTgL8EtACfWXdfd1Wn4Cch1nZreqedNHny
gB0AniRnWo2BAWEjBo6NgpsnT9xobPT3
=3cbC
-----END PGP SIGNATURE-----
 
E

e deleflie

e said:
| 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
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf6FBgACgkQbtAgaoJTgL+QEACcDRJ/jXHvw3W69wkcZupgoqDV
CdwAni7uQiwOw1r/peG0dEvJ/SrmDl9m
=n7Nb
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top