Search code examples
web-servicessoapjax-ws

JAX-WS MessageCreationException


I have created a simple web service which return a response, but I am getting a MessageCreationException due to unexpected EOF for .

I got four methods inside this webservice only method with return response has this problem.

com.sun.xmlns.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <S:Body>

cause by com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <S:Body>

cause by com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element 

Any idea how to solve this? What is the root cause of this problem? I guess the create SOAP message failed due to did not add the <S:Body> end tag. Why is this happening?

I don't know how to debug further from here.


Solution

  • This is due to wrong WSDL creation and entity class.