Resolving SOAPFaultException caused by com.ctc.wstx.exc.WstxUnexpectedCharException

If you’re using any of these for Web Services – Axis2, CXF etc. – that internally makes use of Woodstox XML processor (wstx), and getting an exception like this during webservice calls, Error reading XMLStreamReader.
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ...

the problem is that the wstx tokenizer/parser encountered unexpected (but not necessarily invalid per se) character; character that is not legal in current context. Could happen, for example, if white space was missing between attribute value and name of next attribute, according to API docs (

This simply means that you’re receiving an ill-formed SOAP XML as response. You need to check the SOAP response construction logic/code at the other end you’re communicating to.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 45 other followers

%d bloggers like this: