File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Content is not allowed in prolog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Content is not allowed in prolog" Watch "Content is not allowed in prolog" New topic

Content is not allowed in prolog

Lakshmi Kalidindi

Joined: May 04, 2004
Posts: 14
When I am trying to send soapmessage created by saaj Api, I am getting the error saying "Content is not allowed in prolog". I tried to add prolog,after adding prolog(xml declaration) i am getting another error.

Any ideas would be of great help.

Thanks for all your help.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
If this was my problem I would use SOAPui or TCPMON to capture the exact text of the message. It could be as simple as a single leading space before the <?xml declaration.

I agree. Here's the link:
subject: Content is not allowed in prolog
jQuery in Action, 3rd edition