Calculate the length of SOAP content

How do you calculate the Content-Length is a soap message? Is this the number of characters in the entire soap message?

+4
source share
2 answers

The number of bytes, not the number of characters, so it will depend on the text encoding used.

+2
source

Yes. Convert the XML message to a string and use the string length as Content-Length.

(Suppose you use eight-byte characters.)

+1
source

All Articles