LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
-- Only needs a button with this code and a text field called 'consola'
local arrayListado
on mouseUp
put url "http://www.google.com" into temp --NEW LINE
put "borrado" into cd fld "consola"
Listado
end mouseUp
private command Listado
put "" into datosPeticion
put "<?xml version='1.0' encoding='utf-8'?>" \
& return & "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" \
& return & tab & "<soap:Body>" \
& return & tab & tab & "<Listado xmlns=" & quote & "http://ws.escrol.es/" & quote & " />" \
& return & tab & "</soap:Body>" \
& return & "</soap:Envelope>" \
into datosPeticion
set the httpHeaders to "POST /WebService.asmx HTTP/1.1" \
& return & "Host: ws.escrol.es" \
& return & "Content-Type: text/xml; charset=utf-8" \
& return & "Content-Length: " & the length of datosPeticion \
& return & "SOAPAction: http://ws.escrol.es/Listado"
put "petición iniciada" &cr&cr into field "consola"
post datosPeticion to url "http://ws.escrol.es/WebService.asmx"
put the result into resultado
put it into datosRespuesta
put "the result: " & resultado &cr&cr after field "consola"
put "it: " & datosRespuesta &cr&cr after field "consola"
put "petición terminada"&cr&cr after field "consola"
set the httpHeaders to empty --NEW LINE
---
end Listado
That first "put url..." stinks! I don't understand why that would be needed.
Setting the httpHeaders to empty makes some sense.
All I can say is that with those two additional lines the code does work consistently in the sim.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
This issue seems to be a bug in iOS deployment. I have tested your supplied code on desktop and Android environments without any issues and can constantly replicate the empty results on iOS.
As this is the case, I would recommend filing a bug report on the issue with RunRev Quality Control.
Filing a report with Quality Control is the best way to allow our team to investigate the issues further and implement a fix if needed. As you are filing the report you will automatically receive status updates on it via email.
You will need to log-in with a RunRev Quality Control Account before you can submit a report. If you do not already have one, you will be able to create an account via the "New Account" option shown on the Quality Control homepage.
(…)
The post command is failing on iOS due to the unexpected inclusion of "POST ..." in the first line of httpheaders.
I recommend you remove this line from httpheaders as it will be automatically generated when a request is sent using the post command. Removing this line will fix the issue of post not working on iOS.
There is a bug here, as obviously the behavior on the desktop is different from that on mobile. It should be possible to set the http command used in this way on iOS.