You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ever Olano <ap...@olano.org> on 2003/06/14 00:43:29 UTC
ClassCastException when calling SOAPPart.setContent() with DOMSource
When I pass a DOMSource object to SOAPPart.getContent(), I get
ClassCastException on line 651 of XMLUtils.java, which reads
Element domElement = (Element)((DOMSource)source).getNode();
I was initially passing in a Document object to the constructor of
DOMSource(). I changed it to Element but it would not work either. I
would get another error that says something like "xmlns:soap" attribute
has already been added.
Has anyone tried setContent() with a DOMSource? Right now, I have to
transform my Document into a stream first and then pass StreamSource
instead.
Thanks,
Ever