I'm changing the whole question now. I'm trying to connect to a SOAP service. On windows it works all right, in the application and on SoapUI. On Linux neither of them work. The output to the same request on Linux comes:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Client</faultcode>
<faultstring>Couldn't create SOAP message due to exception: Unable to create StAX reader or writer</faultstring>
</S:Fault>
</S:Body>
</S:Envelope>
On the headers it comes:
Transfer-Encoding chunked
Date Tue, 25 Jun 2013 18:03:46 GMT
#status# HTTP/1.1 200 OK
Content-Type text/xml;charset=utf-8
Server Apache-Coyote/1.1
Anyone knows why it can work on Windows and not on Linux, since it should be sending the same request.