Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a "Payload"? e.g XML Payload

While browsing some web service docs, I came across the word "payload", "xml payload" ...

enter image description here


enter image description here


enter image description here


From wikipedia: "*Payload in computing (sometimes referred to as the actual or body data) is the cargo of a data transmission. *"

Does not make much sense here. Can anyone explain what payload / xml payload mean? Thanks.

like image 630
gilzero Avatar asked Jul 01 '12 16:07

gilzero


People also ask

What is an XML payload?

The "payload" is the actual contents, as opposed to the wrapper, which is the boilerplate XML around (meta-data, document type and such). As such, it is the variable part of the reply.

Which of the following are types of XML payload messages?

Both evaluate an XPath expression against the xml payload of the message, supported payload types by default are Node , Document and String .

Can I send XML in REST API?

The REST API Client Service currently accepts only JSON input when making REST API Create, Read, Update, or Delete requests. It is nevertheless possible to use XML input when making REST API requests.

How does Web API send XML data?

If you want to send XML data to the server, set the Request Header correctly to be read by the sever as XML. xmlhttp. setRequestHeader('Content-Type', 'text/xml'); Use the send() method to send the request, along with any XML data.


1 Answers

The "payload" is the actual contents, as opposed to the wrapper, which is the boilerplate XML around (meta-data, document type and such). As such, it is the variable part of the reply.

The wikipedia definition makes perfect sense to me, as the "non payload" XML in these examples is completely uninteresting. The XML outside is the wrapping, and the payload are the contents ("cargo").

Note that "escaped payload" indicates that the contents are actually some other format, which may be XML escaped. It could be binary data, often escaped as CDATA or Base64, for example. There could be a JPEG image there, for example (if it is correctly escaped). Or HTML, encoded with XML entities. Then the payload would for example be:

<div>example</div>

Which is a simple example for XML-escaped-HTML payload, when there is no reason for the message XML parser to parse the (XML-like) payload.

like image 116
Has QUIT--Anony-Mousse Avatar answered Oct 24 '22 04:10

Has QUIT--Anony-Mousse