[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] XML RPX in PHPGroupware
From: |
Dirk Schaller |
Subject: |
RE: [Phpgroupware-developers] XML RPX in PHPGroupware |
Date: |
Fri, 18 Jun 2004 08:21:02 +0200 |
Hi Shajee,
you need a 'Basic Authorization' with a base64 encoded string of
'sessionid:kp3'.
Does the Header.Add() method do this like the php code below?
$credentials='';
if ($username!='')
{
$credentials='Authorization: Basic ' .
base64_encode($username . ':' . $password) . "\r\n";
}
$op= "POST " . $this->path. "
HTTP/1.0\r\nUser-Agent: PHP XMLRPC 1.0\r\n" .
"Host: ". $this->server . "\r\n" .
$credentials .
"Content-Type: text/xml\r\nContent-Length: "
.
strlen($msg->payload) . "\r\n\r\n" .
$msg->payload;
Dirk
> -----Original Message-----
> From: Shajee [mailto:address@hidden
> Sent: Friday, June 18, 2004 2:03 PM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: [Phpgroupware-developers] XML RPX in PHPGroupware
>
>
> Dear Markus
> Hello!
> I a trying to excess other
> methods(notes) using xml
> rpc after sucessfully calling the login method. I am sending
> the sessionid &
> kp3 as http headers to phpgroupware\xmlrpc.php. However it's
> returning back
>
> "Fault Response: 1001 Session expired"
>
> What could be the reason. Is there any specific way of
> sending the sessionid
> for authentification. I think for going further into query
> data from phpgw
> the sessionid & kp3 have to authenticated at each subsequent calls.
>
> Below is the code snippet that i am using
>
> [XmlRpcMethod("notes.bonotes.listmethods")]
> public XmlRpcStruct listmethods()
> {
> return (XmlRpcStruct)xmlRpcClient.Invoke(this,"listmethods");
>
>
> }
>
>
> private void Button1_Click(object sender, System.EventArgs e)
> {
> try
> {
>
> //sessionid & kp3 id being saved in session variables on login call
> string sessionid = Session["sessionid"].ToString();
> string kp3 = Session["kp3"].ToString();
> string http_auth;
> http_auth= sessionid+":"+kp3;
> xmlRpcClient.Headers.Add(http_auth);
>
> XmlRpcStruct valueStr;
> valueStr = listmethods();
> Response.Write(valueStr);
>
> }
>
> catch (Exception ex)
> {
>
> Response.Write(ex.Message);
>
> }
> }
>
> Thanks & Regards
> Shajee
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>
- RE: [Phpgroupware-developers] XML RPX in PHPGroupware,
Dirk Schaller <=