users@saaj.java.net

Content is not allowed in prolog.

From: Carlo Bertoldi <carlo.bertoldi_at_ubiquity.it>
Date: Tue, 27 Mar 2012 11:23:08 +0200

Hello,
  it's me again, with a different problem this time.

This is an excerpt of the SOAP request I'm receiving:

------=_Part_3_5438437.1107262647279
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Body>
[...]

Doing a message.getSOAPBody() gives me this error:
"Content is not allowed in prolog."
If I add an empty line between Content-type and the xml prolog, the
error disappears.
Any suggestions? Apart from tampering with the request ;)

Thanks,
  Carlo

PS This is the stacktrace: http://pastebin.com/uLB2iaJ8