views:

600

answers:

2

How do you calculate the Content-Length is a soap message? Is it the number of chars in the whole soap message?

A: 

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

(Assuming you are using eight-byte characters.)

David Norman
+1  A: 

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

superfell