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

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似乎是任意的, 可以沒有.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章