Options

Using RPC-XML in WinXP, can't login..:-(

NikolaiNikolai Registered Users Posts: 19,035 Major grins
I finaly realized that smugmug provides this API (thanks, Ben!).
However, when I tried to pursue this opportunity, I hit a roadblock right at the start: I cannot login.:dunno

I'm using win32 app written in Delphi6 with Indy/SSL running on Windows XP Pro.
Here's my app''s log: (email and password ARE correct - I copied them to smugmug login text windows and could login just fine). Sorry, had to replace angle brackets with "{" ones, otherwise forum engine swallows them al. BTW, any know way around that? I tried &lt and &gt, but to no effect..:-(:scratch
:deal
POST to https://upload.smugmug.com/xmlrpc/
{?xml version="1.0"?}
{methodCall}
{methodName}loginWithPassword{/methodName}
{params}
{param}
{EmailAddress}MYEMAIL{/EmailAddress}
{/param}
{param}
{Password}MYPASSWORD{/Password}
{/param}
{param}
{Version}1.0{/Version}
{/param}
{/params}
{/methodCall}
POST: https://upload.smugmug.com/xmlrpc/
HTTP: Status: Disconnecting. (3)
HTTP: Disconnected
HTTP: Status: Disconnected. (4)
I/O: Status: Resolving hostname upload.smugmug.com. (0)
I/O: Status: Connecting to 63.81.134.24. (1)
I/O: Status Info: SSL status: "before/connect initialization"
I/O: Status Info: SSL status: "before/connect initialization"
I/O: Status Info: SSL status: "SSLv2/v3 write client hello A"
I/O: Status Info: SSL status: "SSLv3 read server hello A"
I/O: Status Info: SSL status: "SSLv3 read server certificate A"
I/O: Status Info: SSL status: "SSLv3 read server key exchange A"
I/O: Status Info: SSL status: "SSLv3 read server done A"
I/O: Status Info: SSL status: "SSLv3 write client key exchange A"
I/O: Status Info: SSL status: "SSLv3 write change cipher spec A"
I/O: Status Info: SSL status: "SSLv3 write finished A"
I/O: Status Info: SSL status: "SSLv3 flush data"
I/O: Status Info: SSL status: "SSLv3 read finished A"
I/O: Status Info: SSL status: "SSL negotiation finished successfully"
I/O: Status Info: SSL status: "SSL negotiation finished successfully"
I/O: Status Info: Cipher: name = EDH-RSA-DES-CBC3-SHA; description = EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1 ; bits = 168; version = TLSv1/SSLv3;
HTTP: Status: Connected. (2)
HTTP: Connected
HTTP: Work Begin: wmWrite: count 245
HTTP: Work: count 245
HTTP: Work End
Cookies: New Cookie: SMSESS=643afd0eb2988eaabc34e65c728e2d89; path=/; domain=.smugmug.com
HTTP: Work Begin: wmRead: count 0
I/O: Status Info: SSL status: "SSL negotiation finished successfully"
HTTP: Status: Disconnected. (4)
HTTP: Disconnected
HTTP: Work End
HTTP: Status: Disconnecting. (3)
HTTP: Disconnected
HTTP: Status: Disconnected. (4)
POST finished: HTTP/1.1 200 OK (200)
{?xml version="1.0" encoding="iso-8859-1"?}
{methodResponse}
{fault}
{value}
{struct}
{member}
{name}faultCode{/name}
{value}
{int}1{/int}
{/value}
{/member}
{member}
{name}faultString{/name}
{value}
{string}invalid login{/string}
{/value}
{/member}
{/struct}
{/value}
{/fault}
{/methodResponse}
===============================================================


Seems like all the low-level stuff (SSL, and such) works just fine, however I'm getting the same reposnse over and over.

What am I doing wrong?:bow
Thank you!
"May the f/stop be with you!"

Comments

  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited November 21, 2004
    Found it!!!
    clap.gif
    This was my first experience with RPC-XML, so I misread the specs.
    It turned out that instead of providing actual names for parameters (e.g. "EmailAddress") all parameters are indeed position-based and also nameless, so I had to use actual "value" word and leave the names out (for a hardened delphi/c/c++ veteran this was kinda an unexpected thing, but hey, I've learned something new!)

    Juts in case, here's my working version:
    [PHP]
    <?xml version="1.0"?>
    <methodCall>
    <methodName>loginWithPassword</methodName>
    <params>
    <param>
    <value>EMAIL</value>
    </param>
    <param>
    <value>PASSWORD</value>
    </param>
    <param>
    <value>1.0</value>
    </param>
    </params>
    </methodCall>
    [/PHP]
    Hope this will help somebody!
    Cheers! API, here I come!
    "May the f/stop be with you!"
Sign In or Register to comment.