How do I access the request body in XML format in a WCF REST service?

You can actually pass arguments to to your web methods using this attribute.

You can actually pass arguments to to your web methods using this attribute WebGet(UriTemplate = "users/{username}") here is a sample method from msdn WebGet(UriTemplate = "users/{username}") OperationContract User GetUserAccount(string username) { if (!IsUserAuthorized(username)) { WebOperationContext.Current. OutgoingResponse. StatusCode = HttpStatusCode.

Unauthorized; return; } User user = FindUser(username); if (user == null) { WebOperationContext.Current. OutgoingResponse. SetStatusAsNotFound(); return null; } return user; }.

Thanks for reply. Forgot to add the request body is an xml document. So I need to have that document saved to sql once postd to service – latis Aug 29 at 9:01 RequestFormat=WebMessageFormat.

Xml property of webinvoke should help you. Eg: WebInvoke(Method = "POST",BodyStyle = WebMessageBodyStyle. Wrapped,RequestFormat=WebMessageFormat.

Xml, ResponseFormat = WebMessageFormat. Json) – arjunshetty2020 Aug 29 at 9:12 i'm still having trouble getting the body into a dataset. Do you have any examples?

– latis Aug 29 at 12:10 hope this helps goo. Gl/34BpG, goo. Gl/zQtA3 – arjunshetty2020 Aug 29 at 13:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions