tomasguisasola / luasoap Goto Github PK
View Code? Open in Web Editor NEWLuaSOAP provides a very simple API that convert Lua tables to and from XML documents
LuaSOAP provides a very simple API that convert Lua tables to and from XML documents
I did simple test.
Generate a SOAP output using encode() method and after that I tried decode this with inverse method so I had the error: soap.lua:239: attempt to index local 'o' (a nil value)
Detail: The generated SOAP output haven't soap:Header session (optional by standard)
Example code below:
function test_soap()
local soap = require "soap.soap"
local simple = { namespace = "Some-URI",
method = "Run_Query",
entries = {
{ tag = "Query_text", "select * from teste" }
} }
local ret = soap.encode( simple )
ret = [[]] .. ret
print( ret )
local ns, meth, ent = soap.decode( ret )
print( ns, meth )
return ret
end
Is it possible to switch to Xx.Yy.Zz format? I ask as I've been asked to do this for OpenWrt where most versions of packages follow that format. Changing it upstream would simplify the process.
Similar discussdion: lunarmodules/copas#70
REAME mentions test-wsdl.lua but it does not exist
We found 3 issues with luasoap 3.0 (latest)
Hi ,
I am so sorry to ask you! I can not install by luarocks,becuse I am lua5.1.and I want to install by source code,and how can i do?thanks very much!
Hi.
Defacto luasocket is the most used network api, but, if possible do you can be adapt to works with any API (signature/error codes / layers / aka c function pointers) - the user can be responsible to implement. In same way xml library.
i.e.,
lsocket -> http://tset.de/lsocket/index.html
luacurl -> http://luacurl.luaforge.net/
luaposix -> https://github.com/luaposix/luaposix
and many others
in same way assembley the xml soap/envelope, p. ex., implementations with support to attributes in pure lua or binding.
luasocket x.y + luasec 0.x = problematic ;)
After "make install", I have program doing require'soap.client' and with fails with the following error:
lua: /usr/share/lua/5.1/soap/client.lua:13: module 'soap' not found:
no field package.preload['soap']
no file './soap.lua'
no file '/usr/local/share/lua/5.1/soap.lua'
no file '/usr/local/share/lua/5.1/soap/init.lua'
no file '/usr/local/lib/lua/5.1/soap.lua'
no file '/usr/local/lib/lua/5.1/soap/init.lua'
no file '/usr/share/lua/5.1/soap.lua'
no file '/usr/share/lua/5.1/soap/init.lua'
no file './soap.so'
no file '/usr/local/lib/lua/5.1/soap.so'
no file '/usr/lib/lua/5.1/soap.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/share/lua/5.1/soap/client.lua:13: in main chunk
[C]: in function 'require'
mycode.lua:1: in main chunk
[C]: ?
This is because client.lua does require'soap' but the soap.lua is installed to soap/soap.lua instead.
Should change all require'soap' to require'soap.soap' or change makefile to install soap.lua to proper path.
soap.lua
's decode
fails doubly if given an XML with a SOAP:Header: it fails because the standard function error
isn't present in the scope, and because it expects the first element to be a SOAP:Body, which fails in the presence of a SOAP:Header.
Generate a header table entry when soap:Header is present in SOAP input (decode method), not simply jump this session
While be usefull to add link to ; https://tomasguisasola.github.io/luasoap/ to github project comment and in readme file.
Hello!
This library I believe should be able to meet a goal of mine. I would like to use OpenResty paired with this lib to do a few things:
Take an incoming SOAP payload and:
Parse a SOAP Header element and get its value for processing AND remove that Header element from the SOAP payload.
Append a few extra SOAP Header elements on the existing body before proxying off the payload to another service.
Can this library do this? Any chance you could give me a snippit after I luarocks install of what the above would look like? I imagine it is probably only 5-10 lines of code using your library?
Thanks,
Jeremy
Hi,tanks for your good job.I try to install luasoap,but I get a error,the error is:
`sudo luarocks install luasoap
Installing https://rocks.moonscript.org/luasoap-4.0.1-1.rockspec...
Using https://rocks.moonscript.org/luasoap-4.0.1-1.rockspec... switching to 'build' mode
Missing dependencies for luasoap:
http-digest >= 1.2.2-1
Using https://rocks.moonscript.org/http-digest-1.2.2-1.src.rock... switching to 'build' mode
Missing dependencies for http-digest:
md5
Using https://rocks.moonscript.org/md5-1.3-1.rockspec... switching to 'build' mode
Error: Failed installing dependency: https://rocks.moonscript.org/http-digest-1.2.2-1.src.rock - Failed installing dependency: https://rocks.moonscript.org/md5-1.3-1.rockspec - Error fetching file: Failed downloading https://github.com/keplerproject/md5/archive/1.3.tar.gz - tlsv1 alert protocol version
`
wolud you help me?thanks very much!
Hello!
How to use this library in my openwrt device
Thanks,
Fang
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.