Link to home
Avatar of srikotesh
srikotesh

asked on

can i pass string type of xml to REST Service to consume XML

Hi Experts,

sample xml of type string
 String xmlStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<Tutorial id=\"1\"><technology>Dot net, Java, Big data, Database</technology>\n"+
            "<address>topjavatutorial.com</address></Tutorial>";
 

Open in new window


i want to pass this  xmlStr to  rest-api webservice to conusme it.

request method -post,
acceptable -contente type is -->application/xml

i am having doubt do i need to convert this xmlStr  to XML or i can pass this xmlStr  directly
if possible please provide sample.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial