TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kiran a
NA
20
9.5k
Not able bind xml node with url having query string - .net core 3.1
Dec 29 2020 2:05 PM
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.
<?xml version=
'1.0'
?>
<request>
<charge>2312</charge>
<reason>RING</reason>
<hangup>none</hangup>
<recording_url>https:
//abc.testnow.com/call_recordings_wav.php?sid=G112Qt7S&ks=7273996885894aef526d566605aeed67</recording_url>
</request>
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 ?
Reply
Answers (
4
)
Export Gridview data to excel file
Filter GridView based on textbox values