My network.request SOAP asynchronous call works fine. I need to make a synchronous SOAP call.
First question: is there a recommendation for implementing blocking until the networkListener gets the response? Essentially making network.request synchronous?
Second question: I am not getting a table result for this luasocket code when calling the .NET web service (the same one my network.request is working with)…
local header = {}
header[“Content-Type”] = “text/xml”
header[“Content-Length”] = tostring(xmlRequest:len())
header[“SOAPAction”] = ‘http://10.10.99.158/oii/icisystemservice.asmx?getAttribute’
header[“Host”] = ‘10.10.99.158’
local tblResult = {}
local retcode = http.request{
url = “http://10.10.99.158/oii/icisystemservice.asmx”,
headers = header,
source = ltn12.source.string(xmlRequest),
method =“POST”,
sink = ltn12.sink.tblResult
}
dump(tlbResult)
Using wireshark I can see the HTTP/SOAP requests for both the network.request versus luasocket (http.request) calls. Here is the abstracted wireshark results:
wireshark network.request
HTTP; Request; POST …
SOAP; …
HTTP; Response…
wireshark http.request (luasocket)
HTTP; Request; POST
SOAP;…
The luasocket HTTP; Request does not have the headers [content-type], etc. in it. Also there is no HTTP; Response for the luasocket call. However, the luasocket SOAP has the correct value.
tblResult is empty after my call to luasocket.
Any ideas where I am missing this?
Thank you,
Tony
[import]uid: 161448 topic_id: 29335 reply_id: 329335[/import]