lua-users home
lua-l archive

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


Hi,

How to establish session or connection within a telecom switchwhich
having different cards.

I should establish a session from SP card to different cards within a
shelf.

Pls throw some light on this.

Thanks & Regards,
Adi  

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Keith Pimmel
Sent: Tuesday, June 03, 2008 6:53 PM
To: Lua List
Subject: Re: sending credential info using luaxmlrpc

Hi Pete,

Do you have a published API with which you're trying to interact?

As an example, I used Confluence's remote API [1] with LuaXMLRPC, and it
worked fine. The Confluence API has a login call which returns a session
id string, which is used as a key in all subsequent interactions for
that session. An example code snippet follows:
--[[--------------------------------------------------------------------
-------------------------------------------
require'xmlrpc.http'

local server = 'http://localhost:8080/rpc/xmlrpc'
local user = 'admin'
local password = 'admin'
local space = 'cmt'

-- Login to confluence as user
local ok, token =
xmlrpc.http.call(server,'confluence1.login','admin','admin')
if ok ~= true then
 error('Failed to connect to confluence server') end

local pp = {}
ok,pp = xmlrpc.http.call(server, 'confluence1.getPage', token, space,
parent)

-- etc...
------------------------------------------------------------------------
---------------------------------------]]--


[1] http://confluence.atlassian.com/display/DOC/Remote+API+Specification
--
Keith Pimmel

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com