Title: Soap Message indentation 1.1 and 1.4

Hi, i previously report a message subject "Digital signatures within SOAP messages calling a method with params" i thought that my problem was the sign but now without sign I have problems too.

I am migrating a client from axis 1.1 to 1.4 but i can't change any on the server.

I noticed that if the Request is sent to the server in an indent way the server response fine, but if not the server throws a NullPointerException, like the server is not in my domain i only can watch the logs in an offline proccess, the only strange problem reported on server is :

Request: wcorp.webservices.common.RequestException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

Searching in some threads i found that it was for some blank characters before the <?xml prolog.

Then I capture the data sent by my client and with a socket client sent it again. Then i only noticed that the difference between two message are some breaklines.

Axis 1.1 Client generates this Request:
============================================
POST /WsBEL/services/Carga HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: bel.bci.cl:443
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 3409

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:putXMLDocument soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost/WsBEL/services/Carga">
   <string xsi:type="xsd:string">...</string>
  </ns1:putXMLDocument>
 </soapenv:Body>
</soapenv:Envelope>

Axis 1.4 Client generates this Request:
============================================
POST /WsBEL/services/Carga HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: bel.bci.cl:443
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 3399

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:putXMLDocument soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost/WsBEL/services/Carga"><string xsi:type="xsd:string">...</string></ns1:putXMLDocument></soapenv:Body></soapenv:Envelope>


The first request using my socket application returns a good response:
=======================================
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 12 Jul 2006 20:16:55 GMT
Content-Type: text/xml; charset=utf-8
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:putXMLDocumentResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost/WsBEL/services/Carga">
   <ns1:putXMLDocumentReturn xsi:type="xsd:string">MYRESPONSE
</ns1:putXMLDocumentReturn>
  </ns1:putXMLDocumentResponse>
 </soapenv:Body>
</soapenv:Envelope>

But with the soap message with 1.4 i get:
============================================
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.userException</faultcode>
   <faultstring>java.lang.NullPointerException</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>


How can i indent my soap message after send to the server? is that possible? Another idea? please help.

Thanks for your help.


Este documento puede incluir información confidencial y propiedad de Neoris y deberá ser leído sólamente por la o las personas a quienes está dirijido. Si usted ha recibido este mensaje por error, por favor avise inmediatemente al remitente contestando y eliminando este correo. Cualquier punto de vista u opiniones expresadas en este mensaje son del remitente y no necesariamente coinciden con aquellas de Neoris. Este documento no deberá ser reproducido, copiado, distribuido, publicado, ni modificado por terceros sin la autorización por escrito de Neoris.

Este mensaje ha sido verificado contra virus. Visítenos en www.neoris.com.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to