Open juanper opened 11 years ago
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 = [[<?xml version="1.0" encoding="ISO-8859-1"?>]] .. 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
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 = [[<?xml version="1.0" encoding="ISO-8859-1"?>]] .. ret print( ret ) local ns, meth, ent = soap.decode( ret ) print( ns, meth ) return ret end