when I do a xml post my api works
when I do a json post I get errors
the following inputs and outputs:
1 xml
Input
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<apiRegister xmlns="">
<ClientIn>
<USERID>**value**</USERID>
<PASSWORD>**value**</PASSWORD>
<CLIENTGUID>**value**</CLIENTGUID>
<MANUALCODE>**value**</MANUALCODE>
<TITLE>**value**</TITLE>
<INITIALS>**value**</INITIALS>
<FIRSTNAMES>**value**</FIRSTNAMES>
<SURNAME>**value**</SURNAME>
<IDNUMBER>**value**</IDNUMBER>
<IISVALIDSA>**value**</IISVALIDSA>
<CELLPHONE>**value**</CELLPHONE>
<EMAIL>**value**</EMAIL>
<HOMETEL>**value**</HOMETEL>
<WORKTEL>**value**</WORKTEL>
<FAXNO>**value**</FAXNO>
<POSTALADDRESS>**value**</POSTALADDRESS>
<RESIDENTIALADDRESS>**value**</RESIDENTIALADDRESS>
<LANGUAGE>**value**</LANGUAGE>
<DATEOFBIRTH>**value**</DATEOFBIRTH>
<SEX>**value**</SEX>
<CELLPHONEVERIFIED>**value**</CELLPHONEVERIFIED>
<EMAILVERIFIED>**value**</EMAILVERIFIED>
<OCCUPATION>**value**</OCCUPATION>
<PASSPORTNUMBER>**value**</PASSPORTNUMBER>
<BROKERGUID>**value**</BROKERGUID>
<CHANGEDBY>**value**</CHANGEDBY>
</ClientIn>
</apiRegister>
</soap:Body>
</soap:Envelope>
OutPut:
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<apiRegister_response xmlns="">
<ServiceErrors>
<Error>
<ErrorNumber>2</ErrorNumber>
<ErrorPosition>apiClient</ErrorPosition>
<ErrorRecordId>CLI_CLIENTGUID=**value**</ErrorRecordId>
<ErrorDescription>Invalid Title; **value**</ErrorDescription>
<ErrorRecommendation/>
</Error>
<Error>
<ErrorNumber>4</ErrorNumber>
<ErrorPosition>apiClient</ErrorPosition>
<ErrorRecordId>CLI_CLIENTGUID=**value**</ErrorRecordId>
<ErrorDescription>Invalid IdNumber: **value**</ErrorDescription>
<ErrorRecommendation>SA ID Number must be a 13 digit numeric number</ErrorRecommendation>
</Error>
<Error>
<ErrorNumber>8</ErrorNumber>
<ErrorPosition>apiClient</ErrorPosition>
<ErrorRecordId>CLI_CLIENTGUID=**value**</ErrorRecordId>
<ErrorDescription>Invalid Language: **value**</ErrorDescription>
<ErrorRecommendation/>
</Error>
<Error>
<ErrorNumber>9</ErrorNumber>
<ErrorPosition>apiClient</ErrorPosition>
<ErrorRecordId>CLI_CLIENTGUID=**value**</ErrorRecordId>
<ErrorDescription>Invalid Sex: **value**</ErrorDescription>
<ErrorRecommendation>Must be Male or Female</ErrorRecommendation>
</Error>
<Error>
<ErrorNumber>10</ErrorNumber>
<ErrorPosition>apiClient</ErrorPosition>
<ErrorRecordId>CLI_CLIENTGUID=**value**</ErrorRecordId>
<ErrorDescription>Client with ID:**value** already Exists</ErrorDescription>
<ErrorRecommendation/>
</Error>
</ServiceErrors>
</apiRegister_response>
</soap:Body>
</soap:Envelope>
This is an expected result
However
when I input Json
{
"ClientIn" : {
"USERID" : value,
"PASSWORD" : value,
"CLIENTGUID" : value,
"MANUALCODE" : value,
"TITLE" : value,
"INITIALS" : value,
"FIRSTNAMES" : value,
"SURNAME" : value,
"IDNUMBER" : value,
"IISVALIDSA" : value,
"CELLPHONE" : value,
"EMAIL" : value,
"HOMETEL" : value,
"WORKTEL" : value,
"FAXNO" : value,
"POSTALADDRESS" : value,
"RESIDENTIALADDRESS" : value,
"LANGUAGE" : value,
"DATEOFBIRTH" : value,
"SEX" : value,
"CELLPHONEVERIFIED" : value,
"EMAILVERIFIED" : value,
"OCCUPATION" : value,
"PASSPORTNUMBER" : value,
"BROKERGUID" : value,
"CHANGEDBY" : value
}
}
I get:
{
"apiRegister_response" : {
"ServiceErrors" : [
{
"ERRORNUMBER" : 9007,
"ERRORPOSITION" : "apiRegister",
"ERRORRECORDID" : "Input:Record",
"ERRORDESCRIPTION" : "JSONClass.HandleChar: Unexpected literal (v) at position: 35 USERID\" : value,\n \"PASSWORD\" : value,\n \"CLIENTGUI",
"ERRORRECOMMENDATION" : "Review JSON data and correct it."
}
]
}
}