lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Tomas,

>    I am not sure but I think the authentication information should be
> sent through HTTP headers, thus you cannot do it with soap.client.call(),
> since it sends a fixed set of headers, unfortunatelly.

I found a better way :)
It's working by adding the user/passwd inside the URL (i.e. http://user:passwd@server.dn). No change in LUA code and totally transparent to the authentication methods (your solution is for BASIC only ... and I'm using Digest for a better security).

Now, I'm working to convert response to an object as PHP is doing, I mean, for the moment, I got a response like :
{
  {
    "17607"
    {
      "xsi:type"
      xsi:type = "xsd:int"
    }
    tag = "taskid"
  }
  {
    "PS"
    {
      "xsi:type"
      xsi:type = "xsd:string"
    }
    tag = "taskname"
  }
  {
    {
      "xsi:nil"
      xsi:nil = "true"
    }
    tag = "arg"
  }
  {
    "xsi:type"
    xsi:type = "ns1:TaskDefinition"
  }
  tag = "return"
}


That I'll convert to :
{
    taskid = 17607
    taskname = PS
    arg=nil
}

Bye

Laurent