[ | mood |
| | bored | ] |
[ | music |
| | Foo Fighters - Walking After You | ] |
I'm writing a C# client in the .NET framework. And I'm running into some trouble
with the server communication.
I open a socket to the server and send the following string
String toSend = "POST /interface/xmlrpc HTTP/1.1\r\n"
+ "Host: www.livejournal.com\r\n" +"Content-Type: text/xml\r\n"
+ "Content-length: ";
toSend += blah.Length + "\r\n\r\n" + blah;
blah is the name of the string that contains the following XML.
<?xml version="1.0"encoding="utf8"?><methodCall><methodName>login</methodName><struct><member><name>username</name><value>indif69</value></member><member><name>password</name><value>-----</value></member></struct></methodCall>
and this is what I get back from the server
HTTP/1.1 200 OK
Date: Sun, 23 Jun 2002 20:42:03 GMT
Server: Apache
Content-Length: 360
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.55
X-Cache: MISS from www.livejournal.com
Connection: close
<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultString</name><value><string>Denied
access to method (login) in class (main) at /usr/share/perl5/SOAP/Lite.pm line
2128.
</string></value></member><member><name>faultCode</name><value><string>Client</string></value></member></struct></value></fault></methodResponse>
What am I doing wrong? and how do I fix it? |