cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Unable to post to web service

From: Alexander Zilberman <curl_at_news.windeagle.org>
Date: Thu, 22 Mar 2007 16:14:02 -0400

Hi Shashank Gupta,

-d is the same thing as --data-ascii which removes all new lines in the file
so if u dont mind sending ur file as one big line then its not a problem, I
guess that might be the problem, however if u want to send it exactly like
it is, another words in binary form, then use --data-binary instead of -d
and u don't need -X POST because you already are doing a POST

Alex Zilberman

On 3/22/07, Shashank Gupta <gumnam_musafir_at_yahoo.com> wrote:
>
> curl http://localhost:8080/axis/services/myService -H "SOAPAction:
> www.example.com" -H "Content-Type: application/text" -d @file.txt -X POST
>
> returns : org.xml.sax.SAXParseException: Content is not allowed in prolog.
>
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://sc
> hemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" x
> mlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "><soapenv:Body><soapenv:Faul
> t><faultcode>soapenv:Server.userException</faultcode><faultstring>
> org.xml.sax.SA
> XParseException: Content is not allowed in
> prolog.</faultstring><detail><ns1:hos
> tname xmlns:ns1="http://xml.apache.org/axis/
> ">machineName</ns1:hostname></det
> ail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>
> Any help will be appreciated
> thx
>
>
Received on 2007-03-22