Hi Team,
I am trying to receive xml response as below but iam not able to bind to xml element because of "&" in recordingurl node.
I have xml resonse as below.
- '1.0'?>
2312 RING none https://abc.testnow.com/call_recordings_wav.php?sid=G112Qt7S&ks=7273996885894aef526d566605aeed67
My web api code :
- [HttpPost]
- [Route("cdr")]
- [Consumes("application/xml")]
- public async Task<int> CDACallback([xmlelement]request CDaCallbackModel)
- {
- }
added below line in startup.cs
- services.AddMvc().AddXmlSerializerFormatters();
Getting below error message in postman.
{
"errors": {
"": [
"An error occurred while deserializing input data."
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "|8f5da348-4786fb0f473302ff."
}
Is not possible to bind to XML element ?
kiran aPosted Dec 29, 2020, 3:35 PM
Sachin SinghPosted Dec 29, 2020, 3:24 PM
kiran aPosted Dec 29, 2020, 3:13 PM
Sachin SinghPosted Dec 29, 2020, 2:46 PM