Working with a 3rd party developer on using our SOAP web services with JSON we find the following non-JSON behaviors.
1. All of the fields in a struct must be referenced in the JSON, even if the value is empty.
2. The format of dates must match the regional setting of the server. In our case, 1967-12-31 fails even though it is in the correct format for JSON.
I need to revisit the service. I'm thinking maybe the empty fields issue can be addressed, but how about the date? Anyone else using SOAP services with JSON?
The following JSON was successfully processed. Note the number of empty fields and the date of birth.
Code:
{
"tData": {
"Title":"",
"FirstName": "xxxxx",
"MiddleInitial": "",
"LastName": "xxxxx",
"Suffix": "",
"Address1": "",
"Address2": "",
"Phone2": "",
"MaritalStatus": "",
"Description": " ",
"City": "MIAMI",
"State": "FL",
"Zip": "33xxx",
"Phone1": "xxxxxxxxxx",
"EmailAddress": "xxxxxxxxxx1967@yahoo.com",
"DateOfBirth": "12-31-1967",
"Source": "xxxxxx"
}
}