Author: darran.lofthouse(a)jboss.com
Date: 2008-08-19 13:45:22 -0400 (Tue, 19 Aug 2008)
New Revision: 8119
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
Log:
[JBWS-2285] ClassCastException: org.jboss.ws.core.soap.TextImpl in
LogicalMessageImpl.getPayload.
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2008-08-19
17:24:39 UTC (rev 8118)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2008-08-19
17:45:22 UTC (rev 8119)
@@ -151,7 +151,7 @@
SOAPMessage soapMessage = (SOAPMessage)message;
SOAPBodyImpl soapBody = getSOAPBody(soapMessage);
- SOAPContentElement bodyElement = getBodyElement(soapBody);
+ SOAPContentElement bodyElement = (SOAPContentElement)getBodyElement(soapBody);
if (bodyElement != null)
{
payload = bodyElement.getObjectValue();
@@ -171,7 +171,7 @@
SOAPMessage soapMessage = (SOAPMessage)message;
SOAPBodyImpl soapBody = getSOAPBody(soapMessage);
- SOAPContentElement bodyElement = getBodyElement(soapBody);
+ SOAPContentElement bodyElement = (SOAPContentElement)getBodyElement(soapBody);
if (bodyElement != null)
{
bodyElement.setObjectValue(payload);
@@ -184,17 +184,17 @@
}
}
- private SOAPContentElement getBodyElement(final SOAPBodyImpl soapBody)
+ private SOAPElement getBodyElement(final SOAPBodyImpl soapBody)
{
- SOAPContentElement bodyElement = null;
+ SOAPElement bodyElement = null;
NodeList nodes = soapBody.getChildNodes();
for (int i = 0; i < nodes.getLength() && bodyElement == null; i++)
{
Node current = nodes.item(i);
- if (current instanceof SOAPContentElement)
+ if (current instanceof SOAPElement)
{
- bodyElement = (SOAPContentElement)current;
+ bodyElement = (SOAPElement)current;
}
}
Show replies by date