Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error decoding a XML SOAP withou soap:header ( generated by LuaSOAP encode() ) #5

Open
juanper opened this issue Dec 20, 2012 · 1 comment

Comments

@juanper
Copy link

juanper commented Dec 20, 2012

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

@tomasguisasola
Copy link
Owner

Hi Juan

On Thu, 20 Dec 2012, Juan José Pereira wrote:

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
Do you have the latest version installed? This bug was already
correcter, but I've just realized that the 2.0.2 version was released
with an incorrect _VERSION (it states LuaSOAP 2.0.1).

Regards,
    Tomás

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants