Hi all!
I have an HTTP servlet, which reads the input on the doPost method and creates a SOAP Message from it, using the SAAJ API. It works correctly, but when the application (.war) is deployed again without restarting the jboss, the SOAP message creation fails with error:
at org.jboss.util.xml.DOMUtils.hasChildElements(DOMUtils.java:324)
at org.jboss.ws.soap.NodeImpl.(NodeImpl.java:88)
at org.jboss.ws.soap.TextImpl.(TextImpl.java:38)
at org.jboss.ws.soap.SOAPElementImpl.addTextNode(SOAPElementImpl.java:272)
at org.jboss.ws.soap.MessageFactoryImpl.createSOAPEnvelope(MessageFactoryImpl.java:399)
at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:227)
at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:157)
The code is something like this:
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
SOAPMessage message = MessageFactory.newInstance().createMessage(null, request.getInputStream());
...
}