Calculate content-length

K

kackson

Hi.
Before I POST my soap message, I need to fill out the Content-Length
for my content to tbe sent over. For the case below:

POST /SoapExamples/simpleService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "urn:schemas-syngress-com-soap/echo"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<echo xmlns="urn:schemas-syngress-com-soap">
<input>string</input>
</echo>
</soap:Body>
</soap:Envelope>

what is my content length? How do you calculate it? I dont seems to be
able to get the right content length. Are there also tools/scripts to
calculte the content legnth? Thank you.
 
J

Jan Tielens

The content length is part of the http protocol. Do you really want to send
a soap message so "low level"? If you do it the easy way you don't have to
worry about it!
 
K

kackson

Yes. I really do need to take care of this low level stuff because I'm
tasked to write a simple http client with a tight deadline and thus
little time to read through all those low level details of http.
So, for my first message, what should be the Content length?
Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top