Re: Send XML request to a server with telnet.
Nanar Duff a écrit :
> Thanks for your answer, I try it by doing this:
>
> *************************************************
> $ telnet <ip address> 8080
> POST /wher/I/want/to/send/my/data/ HTTP/1.1\r\n
> Content-Type: text/xml; charset=utf-8\r\n
> SOAPAction: ""\r\n
> Content-Length: 785\r\n
> Expect: 100-continue\r\n
> Host: <ip address>:8080\r\n
> \r\n
> <xml><code><sent>to server</sent></code></xml>
>
> HTTP/1.1 400 Bad Request
> Server: Apache-Coyote/1.1
> Date: Sat, 06 May 2006 07:25:32 GMT
> Connection: close
>
> Connection closed by foreign host.
> $
> ************************************************** *
>
>
> But I' m not sure of the value of Content-Length. Is this the number of
> character in the XML request ?
>
> And maybe that my XML request is wrong. But server shouldn't send me
> "data" to warn me that my request was wrong ?
>
> Thanks.
Oops, I try request without \r\n, and its works fine.
Thanks.
|