-1

I receive the following exception when I try to convert a soap message into a string:

java.io.IOException: The serializer class 'org.apache.xml.serializer.ToXMLStream' does not implement org.xml.sax.ContentHandler.
at com.sun.xml.messaging.saaj.soap.impl.EnvelopeImpl.output(EnvelopeImpl.java:309)
at com.sun.xml.messaging.saaj.soap.impl.EnvelopeImpl.output(EnvelopeImpl.java:320)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:326)
at com.sun.xml.messaging.saaj.soap.MessageImpl.getHeaderBytes(MessageImpl.java:1030)
at com.sun.xml.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1181)
at com.sun.xml.messaging.saaj.soap.MessageImpl.writeTo(MessageImpl.java:1311)
at com.HeaderHandler.handleFault(HeaderHandler.java:155)
at com.HeaderHandler.handleFault(HeaderHandler.java:37)

Here is the code that is being executed:

SOAPMessage message = smc.getMessage(); <-- smc = SOAPMessageContext
ByteArrayOutputStream stream = ByteArrayOutputStream();
message.writeTo(stream);

We just moved to a jboss environment (eap 6.4) and this worked locally in a junit so i'm guessing there is something missing in the environment such as a missing module dependency.

Can anyone shed some light as to what causes this error and how it can be fixed?

1 Answer 1

0

It is clear from java.io.IOException: The serializer class 'org.apache.xml.serializer.ToXMLStream' does not implement org.xml.sax.ContentHandler. That is the cause.

How to fix is that you need to use something that implements org.xml.sax.ContentHandler.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.