If I throw a SOAPException (from server side) containing special characters 
like '<' I receive following error (on client side):
Exception: java.lang.Exception:SOAPException= SOAP-ENV:Client, Parsing error, 
response was:
The content of elements must consist of well-formed character data or markup.

When examine the XML message I found that '<' is not parsed into '&lt;' as it 
is when sending requests and getting non-error responds. XML:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/1999/XMLSchema";><SOAP-ENV:Body><SOAP-ENV:Fault>
<faultcode>1</faultcode>
<faultstring>Supplied system id is not a registred system. systemType:2<3, 
registredSystemID:false</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor></SOAP-ENV:Fault>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

Putting ![CDATA[ and ] around all text in SOAPException solved this problem.

I am using tomcat 3.2.3 and apache soap 2.2. Anyone else experience the same problem? 
Other solution?

Regards,
Micael Ericsson

Reply via email to