[jboss-jira] [JBoss JIRA] Created: (JBAS-3384) The character ' is not normalized in class DOMWriter
Dirk Moegenburg (JIRA)
jira-events at jboss.com
Tue Jul 11 10:12:11 EDT 2006
The character ' is not normalized in class DOMWriter
----------------------------------------------------
Key: JBAS-3384
URL: http://jira.jboss.com/jira/browse/JBAS-3384
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Other
Affects Versions: JBossAS-4.0.4.GA
Environment: All operating system and software platform
Reporter: Dirk Moegenburg
Problem:
---------
The following soap message should parsed by JBossWS/JBoss 4.04GA
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<oms:ExecuteResponse xmlns:oms="http://omsoe.crm.tmobile.net/services/oms">
<data>
<ReturnValue code="NOT_VALID" validationErrors="invalid XML <xml-fragment xmlns:ins="http://omsoe.crm.tmobile.net/datatypes/ccoscks/installakz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oms="http://omsoe.crm.tmobile.net/services/oms" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>: Expected elements 'contractNumber iccid msisdn' before the end of the content in element contractIdentificator
" />
</data>
</oms:ExecuteResponse>
</soap:Body>
</soap:Envelope>
The following exception "caused by: java.io.IOException: org.xml.sax.SAXParseException: Element type "ReturnValue" must be followed by either attribute specifications, ">" or "/>"." is thrown by JBoss.
Analysis:
---------
The problem is caused by the XML attribute expression:
validationErrors="invalid XML ... Expected elements 'contractNumber iccid msisdn' before the end of the content..."
JBoss performs the following steps:
(1) Converting the soap xml snippet(see above) from XML in a DOM document
(2) Converting DOM document in the xml snippet with the following result:
validationErrors='invalid XML ... Expected elements 'contractNumber iccid msisdn' before the end of the content'
The XML attribute value is not wellformed because the embedded ' character is not allowed. The bug is caused by the class "org.jboss.util.xml.DOMWriter.java".
The character ' is not normalized in the methode: private String normalize(String s).
Solution:
---------
The following code snippet has added in the case statement of the method normalize():
case '\'':
{
str.append("'");
break;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list