Http request using AT command in PLS8-X model | Telit Cinterion IoT Developer Community
December 16, 2015 - 2:42pm, 4639 views
Hello,
I have PLS8-X model and AT_command docs. I have try to call SOAP web service using AT-Commands. see below my steps to generate http post request. But something is wrong, it's say HTTP/1.1 400 Bad Request.
at^siss=3,srvtype,http
OK
at^siss=3,address,"https://www......"
OK
at^siss=3,cmd,"post"
OK
at^siss=3,hcProp,"Content-Type:text/xml\0d\0aSOAPAction:getdata"
OK
at^siss=3,hcContLen,876
OK
at^sica=1,1
OK
at^siso=3
OK
^SIS: 3,0,2200,"Http connect 144.202.209.25:443 Cmd: post"
^SISW: 3,1
at^sisw=3,876
^SISW: 3,-2,0
<past xml string request here, it's contain 876 length>
OK
^SIS: 3,0,200,"HTTP/1.1 400 Bad Request"
^SISR: 3,1
At^sisc=3
OK
^SIS: 3,0,2200,"HTTP Server Closed"
When m try to wrtite data using at^sisw=3,876 then i will get ^SISW: 3,-2,0 this it's ok,? I think here problem bucz it's need came like ^SISW: 3,876 but not understand what I missing. Please help if I m wrong and also help me to call SOAP web service using AT-Command.
Hi,
Could you please let me know what is your FW version?
Please also try to change the hcProp from:
"Content-Type:text/xml"
to:
"Content-Type: application/soap+xml;charset=UTF-8"
Best regards,
Michał
Hello,
FW is
ati
Cinterion
PLS8-X
REVISION 02.502
I have try to change the hcProp but I have get same response. Is there any other setting to call post method?
Hello,
I think that a t this point it would be needed to do some tracing on the server side if possible to check what the server receives and why refuses the data.
Regards,
Bartłomiej
Hello,I try to call another POST method of the google maps API. I write command below..
Configure Internet Connections.
AT+CGDCONT=1,"IP","phone"
OK
at^siss=3,srvtype,http
OK
at^siss=3,address,http://maps.googleapis.com/maps/api/geocode/json?
OK
at^siss=3,cmd,"post"
OK
at^siss=3,hcProp,"Content-Type: application/json"
OK
AT^SISS=3,"hcContLen","0"
OK
AT^SISS=3,"hcContent","address=Ahmedabad"
OK
AT^sica=1,1
OK
at^siso=3
OK
^SIS: 3,0,2200,"Http connect 216.58.220.42:443 Cmd: post"
^SISR: 3,1
at^sisr=3,500
^SISR: 3,52
{
"results" : [],
"status" : "ZERO_RESULTS"
}
OK
^SIS: 3,0,2200,"HTTP Server Closed"
^SISR: 3,2
at^sisc=3
OK
As per response, I think hcContent String can not send to server bucz I can not see ^sisw=3,2 URC after call at^siso=3 command. that's why m get response like this. Can you guid me any other missing setting for calling post method. I read https://iot-developer.thalesgroup.com/tutorial/concept-board-internet-se... for understanding how to call post method.
thanks
Durgesh Patel
Hello,
You don't get the SISW URC because you have set "hcContLen" to 0 which is OK because you did so to transfer the content of "hcContent" parameter instead of sending data with SISW. If you had set the value greater then 0 the "hcContent" data would have been ignored.
I think that you should really test with some server you have access to in order to check what is going on on the server side.
Or if you just would like to see what the other party has received you could just set up the socket server and try to connect to it with your http connection.
Regards,
Bartłomiej