# Rest Using XML - Code sample to receive XML as input in the REST service

**URL:** <https://techcommunity.softwareag.com/t/rest-using-xml-code-sample-to-receive-xml-as-input-in-the-rest-service/237306>\
**Category:** Knowledge base\
**Tags:** REST, xml\
**Created:** [August 29, 2019, 1:55am UTC](https://techcommunity.softwareag.com/t/rest-using-xml-code-sample-to-receive-xml-as-input-in-the-rest-service/237306 "2019-08-29T01:55:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_K\_Sreenivas](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/mahesh_k_sreenivas/32/299_2.png) [@Mahesh\_K\_Sreenivas](https://techcommunity.softwareag.com/u/Mahesh_K_Sreenivas)\
**Post date:** [August 29, 2019, 1:55am UTC](https://techcommunity.softwareag.com/t/rest-using-xml-code-sample-to-receive-xml-as-input-in-the-rest-service/237306/1 "2019-08-29T01:55:07Z")

</div>

Attached is the package which shows how to receive the XML input as a POST REST request.&nbsp;

URL:&nbsp;http://localhost:5555/rest/RestUsingXML/test

Sample Data:

\<?xml version="1.0"?\>

\<dataDoc\>

\<Name\>Mahesh\</Name\>

\<Addr\>Sydney\</Addr\>

\<Data\>

\<phone\>0426 722 XXX\</phone\>

\<email\>maheshksreenivasulu@gmail.com\</email\>

\</Data\>

\<Data\>

\<phone\>0426 722 XXX\</phone\>

\<email\>maheshksreenivasulu@gmail.com\</email\>

\</Data\>

\</dataDoc\>

Any questions, leave your comments below:

[RestUsingXML.zip](https://techcommunity.softwareag.com/uploads/short-url/32RQWxadqOp9MfPyd7H9LGsPCm2.zip) (7.21 KB)

---

<div class="post-metadata">

**Author:** ![melattar](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@melattar](https://techcommunity.softwareag.com/u/melattar)\
**Post date:** [July 27, 2021, 10:05am UTC](https://techcommunity.softwareag.com/t/rest-using-xml-code-sample-to-receive-xml-as-input-in-the-rest-service/237306/2 "2021-07-27T10:05:19Z")

</div>

Hi Mahesh,

Great work on this, really helped…  
Can you advise on the implementation as I can’t quite figure out how it works
