[
http://jira.jboss.com/jira/browse/JBWS-1647?page=all ]
Darran Lofthouse updated JBWS-1647:
-----------------------------------
Summary: Text Node Preservation For Messages Sent Across The Wire (was: Text
Nodes in message cause ClassCastException for org.jboss.ws.core.soap.TextImpl)
Description:
Issue JBWS-1511 added support for the MessageFactory to preserve comments and text nodes.
This Jira issue is to add tests for these messages being sent across the wire and to fix
the associated issues.
- SOAPMessage.writeTo comments after body were not escaped.
- SOAPElementImpl was trimming text nodes so they were getting dropped.
Then running the test suite there were problems in the following areas: -
- A number of areas did not expect child nodes to be text nodes and were thrown
ClassCastExceptions so have changed to skip these.
- A number of tests also did not expect this so have changed these tests to call
getChildElements and pass in the expected name so the text nodes will not be returned.
was:
The following message: -
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.jboss.org/support/phonebook/types">
<soapenv:Header/>
<soapenv:Body>
<!--
Hello
-->
<typ:lookup>
<firstName>Darran</firstName>
<surname>Lofthouse</surname>
</typ:lookup>
</soapenv:Body>
</soapenv:Envelope>
Causes the following exception to be logged: -
15:59:46,951 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception
java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl
at
org.jboss.ws.core.soap.SOAPMessageDispatcher.getDispatchDestination(SOAPMessageDispatcher.java:108)
at
org.jboss.ws.core.soap.SOAPMessageImpl.getOperationMetaData(SOAPMessageImpl.java:316)
at
org.jboss.ws.core.server.AbstractServiceEndpointInvoker.getDispatchDestination(AbstractServiceEndpointInvoker.java:339)
at
org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:168)
at
org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at
org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:444)
at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
Text Node Preservation For Messages Sent Across The Wire
--------------------------------------------------------
Key: JBWS-1647
URL:
http://jira.jboss.com/jira/browse/JBWS-1647
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jaxrpc
Reporter: Darran Lofthouse
Assigned To: Darran Lofthouse
Fix For: jbossws-2.0.0
Issue JBWS-1511 added support for the MessageFactory to preserve comments and text
nodes.
This Jira issue is to add tests for these messages being sent across the wire and to fix
the associated issues.
- SOAPMessage.writeTo comments after body were not escaped.
- SOAPElementImpl was trimming text nodes so they were getting dropped.
Then running the test suite there were problems in the following areas: -
- A number of areas did not expect child nodes to be text nodes and were thrown
ClassCastExceptions so have changed to skip these.
- A number of tests also did not expect this so have changed these tests to call
getChildElements and pass in the expected name so the text nodes will not be returned.
--
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