title: REST webservice that consumes XML
body: <p>I am learning REST webservice and confused about some concepts.
  I want to create a RESTful webservice that consumes an XML like: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;emp:EmployeeEntry xmlns:emp="http://www.employee/entry"&gt;
    &lt;emp:number&gt;12345&lt;/emp:number&gt;
    &lt;emp:name&gt;George&lt;/emp:name&gt;
    &lt;emp:date&gt;2015-04-03&lt;/emp:date&gt;
    &lt;emp:address&gt;
      &lt;emp:city&gt;Paris&lt;/emp:city&gt;
      &lt;emp:street&gt;East 35&lt;/emp:street&gt;
    &lt;/emp:address&gt;
  &lt;/emp:EmployeeEntry&gt;
  </code></pre>
  
  <p>So, If I want to create a restful webservice that consumes this XML, How would be the signature of my method?</p>
  
  <pre><code>    public creatEmp(XML xml);   
  </code></pre>
  
  <p>Should it be like this? 
  (Because I saw some examples of methods that consume XML, but they are taking parameter as main entiry object eg; Employee I don't understand how a method that consumes XML accepts and Entity object as parameter) </p>
  
  <p>Also, If the method is given XML as parameter, do I have to implement parsing logic in the method then create Employee object from that and the start the main create logic?</p>
  
  <p>I have some knowledge gaps, please suggest me some examples or some good tutorials. </p>