Caused by: com.ctc.wstx.exc.WstxParsingException: Received non-all-whitespace CHARACTERS or CDATA event in nextTag()

  1. 云栖社区>
  2. 博客>
  3. 正文

Caused by: com.ctc.wstx.exc.WstxParsingException: Received non-all-whitespace CHARACTERS or CDATA event in nextTag()

sy9876 2019-05-21 18:14:42 浏览1542
展开阅读全文

java client 调用webservice, 返回以下错误:

返回message:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault>java.lang.Exception:  Invalid SOAP formart for xml!

日志:

Caused by: com.ctc.wstx.exc.WstxParsingException: Received non-all-whitespace CHARACTERS or CDATA event in nextTag().
 at [row,col {unknown-source}]: [3,528]

原因是发送的message中缺少了

<env:Header/>

soap envelope schema定义中, header似乎是任意的, 可以没有.

网友评论

登录后评论
0/500
评论