[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

sending a file via XML RPC

e deleflie

4/6/2008 10:46:00 PM

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 )

3 Answers

Phillip Gawlowski

4/6/2008 11:10:00 PM

0

-----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....

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

e deleflie

4/7/2008 2:45:00 AM

0

> 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

Phillip Gawlowski

4/7/2008 12:31:00 PM

0

-----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....

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