lua-users home
lua-l archive

LuaSoap and argument containting an '&'

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


Hello,

How to encode an argument that contains an ampersand ?

My code is the following :

client.call {
url = ""> soapaction = "nanaafoutre",
method = "Report",
entries = {
{
tag="status",
attr = { "xsi:type", ["xsi:type"] = "xsd:boolean", },
rc == 0 and "true" or "false"
},{
tag="output",
attr = { "xsi:type", ["xsi:type"] = "xsd:string", },
res
}
}
}

but evrytime the string res contains "&" character, I got following error :

lua: /usr/local/share/lua/5.1/soap/client.lua:78: Error on request: 1

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Bad Request</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

So what have I to do ?

Thanks

Laurent

AltStyle によって変換されたページ (->オリジナル) /