Monday, 18 November 2024

REST Message to send xml payload

 https://stackoverflow.com/questions/6631035/rest-service-put-xml-payload-structure


can use content-type: application/xml or content-type: text/xml

and also accept:application/xml  or accept:text/xml


if an XML document -- that is, the unprocessed, source XML document -- is readable by casual users, text/xml is preferable to application/xml. MIME user agents (and web user agents) that do not have explicit support for text/xml will treat it as text/plain, for example, by displaying the XML MIME entity as plain text. Application/xml is preferable when the XML MIME entity is unreadable by casual users.

https://stackoverflow.com/questions/4832357/whats-the-difference-between-text-xml-vs-application-xml-for-webservice-respons


XML might need full envelope depending on server

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://destionationEndPOint">

<soapenv:Header/>

<soapenv:Body>

</soapenv:Body>

</soapenv:Envelope>


No comments:

Post a Comment