I have code that posts data to an SSL page in PHP on an Apache server. The code is the same on both platforms and works from Android but doesn''t post from the iPhone. The server responds with a message that not all the required data items were posted. This clearly indicates that the server was contacted and can respond but that the post itself didn't succeed (I wrote the server code so know this is true). You'll note that both posted maps contain the same 14 data items.
The code is a service in B4A and a class in B4i. The iHttpUtils2 version is 3.02. The B4i version is 8.30 and I'm using the hosted builder.
What could be the problem?
Here's the B4X code:
In B4i, here's the log:
Sending to Server: NSMapTable {
[2] scallapp_version -> 0.04
[5] phone -> 4015551212
[6] vessel_2 -> comet
[7] last_name -> smith
[10] vessel_1 -> Strega
[11] passcode -> XXXXXXXXXXXXXXXXXXXX
[15] email -> jsmith@test.org
[17] vessel_3 -> nimble
[18] first_name -> john
[21] verified -> 0
[24] device_type -> iPhone
[26] id -> 0
[30] os_version -> iOS
[31] device_id -> 1234567890
}
Raw server response: Error: (14) The post does not contain all fields
In B4A, here's the log:
*** Service (comm) Create ***
** Service (comm) Start **
Sending to Server: (MyMap) {phone=4015551212, passcode=XXXXXXXXXXXXXXXXXXXX, last_name=smith, vessel_3=nimble, email=jsmith@test.org, vessel_2=comet, verified=0, first_name=john, vessel_1=strega, id=0, device_type=samsung - SM-A516U1, os_version=Android SDK: 33 (13), scallapp_version=0.04, device_id=1d1ed30c74b37c50}
*** Receiver (httputils2service) Receive (first time) ***
Raw server response: 11-1-U-QUaSAWexVbrZZYJjBNQl
Thanks for any assistance.
The code is a service in B4A and a class in B4i. The iHttpUtils2 version is 3.02. The B4i version is 8.30 and I'm using the hosted builder.
What could be the problem?
Here's the B4X code:
Logged Post:
Log("Sending to Server: " & CommMap)
Wait For (HttpPostMultipart(CommURL, CommMap)) Complete (Result As String)
Log("Raw server response: " & Result )
In B4i, here's the log:
Sending to Server: NSMapTable {
[2] scallapp_version -> 0.04
[5] phone -> 4015551212
[6] vessel_2 -> comet
[7] last_name -> smith
[10] vessel_1 -> Strega
[11] passcode -> XXXXXXXXXXXXXXXXXXXX
[15] email -> jsmith@test.org
[17] vessel_3 -> nimble
[18] first_name -> john
[21] verified -> 0
[24] device_type -> iPhone
[26] id -> 0
[30] os_version -> iOS
[31] device_id -> 1234567890
}
Raw server response: Error: (14) The post does not contain all fields
In B4A, here's the log:
*** Service (comm) Create ***
** Service (comm) Start **
Sending to Server: (MyMap) {phone=4015551212, passcode=XXXXXXXXXXXXXXXXXXXX, last_name=smith, vessel_3=nimble, email=jsmith@test.org, vessel_2=comet, verified=0, first_name=john, vessel_1=strega, id=0, device_type=samsung - SM-A516U1, os_version=Android SDK: 33 (13), scallapp_version=0.04, device_id=1d1ed30c74b37c50}
*** Receiver (httputils2service) Receive (first time) ***
Raw server response: 11-1-U-QUaSAWexVbrZZYJjBNQl
Thanks for any assistance.