|n00b XML-RPC Question
||[Jan. 14th, 2004|02:23 pm]
LiveJournal Client Discussions
Yo, asked this on lj_dev, but no dice for what I was looking for; told to ask here.|
Where do I point my XML-RPC post to? I got the header info fine, but do I actually send the, let's say, login post to?
I was using:
Now, I know how the header looks for, but basically, Flash is looking for WHERE to send the XML message TO. Like, when you submit a web page via POST, you point to the URL in the post form tag attribute... in Flash for it's XML object, it's the same thing.
I tried the above URL; naturally, interface/xmlrpc won't work as since Flash is a client based technology, it's running on my desktop or my web site, so has to have a full path.
I tried also:
...still no dice.
Any clue? Thanks in advance!
just a general suggestion: 1)usually it's useful to use a debugger to see what is going on and what is sent exaclty 2) see some samples (just search google)
All the messages go to that same URL. The function name in the XML payload indicates what operation you're performing.
No offense, but I get the feeling you may not understand how XML-RPC works?
(You aren't really putting the "HTTP/1.0" part in the URL, are you? That would definitely not work.)
I probably don't as I usually have been dealing with Flash Remoting at work, which is one whopping wrapper for web services. It's been doing it's job well; removing me from the details.
So much so that I have no clue between SOAP, a web-service, XML-RPC, etc. However, they (flat vs. XML-RPC) seemed similiar enough that I figured I could just change the post to address as XML is a lot easier to deal with in Flash.
I got the flat one work by posting my URL encoded jazz to:http://www.livejournal.com/interface/flat
I get success, etc.
However, I'm assuming for the remote procedure to work, it's passing the XML to:http://www.livejournal.com/interface/xmlrpc
I don't know, as I've only used the flat interface. But I assume the XML-RPC address given in the docs is correct, as there are a number of clients using it.
If you have access to an XML-RPC library, all you should need to do is pass it the URL, the function name, and the parameter list, and get a response.
If you're rolling it yourself at the HTTP level, then you really need to read up on XML-RPC to learn how to package up the request and parse the response.
Note that the flat and XML-RPC interfaces are very different in the ways they pass parameters and receive responses. You can't just pass the same data to either one.
I got the XML formatted right for the parameters based on the login's example, but I think I'm using the library wrong.
:: tests again ::
OOoook... it's actually got a seperate API for RPC. Case of RTFM; got the URL right, but have to attach the parameters seperately.
Cool, thanks for your patience! Hopefully after another 20, I'll be successful.
Problems worthy of attack
Prove their worth by fighting back.