tags:

views:

60

answers:

2
+1  Q: 

WCF REST POST XML

Whats the best way that I can create wcf rest post that accepts xml document(with out any query string)?

A: 

You can accept a XElement as a single parameter with no placeholders in the UriTemplate.

[OperationContract]
[WebInvoke(Method="POST", UriTemplate="DoSomething")]
public XElement DoSomething(XElement body) {
    ...
    return new XElement("Result");
}
Josh Einstein
A: 

Your question is very very broad and hard to answer.

To learn more about WCF REST, check out the WCF REST Developer Center and the WCF REST screen cast series by Pluralsight - they should both help you understand the basics, and if you have a more focused, a more clearly formulated answer about something in those learning materials, come and ask again.

The Pluralsight screencasts in particular are very helpful and easy to understand - 15 to 20 minute tutorial on how to do certain things with WCF REST - e.g. HTTP Plain Old XML Service or a lot of other topics, too (ATOM syndication and a lot more). Check it out!

marc_s