Skip to content

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

@juanper

Description

@juanper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions