[問題] Java(JSP) + dom4j
我寫了一個JSP Page
裡面要用httpconnector跟另外一個Service溝通~
這部份沒問題~
但是由於溝通的封包內容是XML,所以要做XML Parse的動作
所以我在JSP那邊用了dom4j...
但是在
SAXReader reader = new SAXReader();
Document document = reader.read(new InputStreamReader(is));
在上面那行就出現了exception (其中那個is為httpresponse回來的xml(SOAP)格式的封包)
出現的exception如下...
org.dom4j.DocumentException: Error on line 1 of document : The prefix
"SOAP-ENV" for element "SOAP-ENV:Envelope" is not bound. Nested exception:
The prefix "SOAP-ENV" for element "SOAP-ENV:Envelope" is not bound.
我懷疑可能是namespace的問題或者是其XML or SOAP的封包格式不是很標準...
但是由於那個XML是httpresponse直接收下來的又不能改格式...
我文也爬了~Google也咕過了~還是不知道怎麼解~所以上來請問各為大大了~T_T
謝謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.173.4.134
推
05/23 00:18, , 1F
05/23 00:18, 1F
→
05/23 00:19, , 2F
05/23 00:19, 2F
→
05/23 00:22, , 3F
05/23 00:22, 3F
→
05/23 00:24, , 4F
05/23 00:24, 4F
→
05/23 12:09, , 5F
05/23 12:09, 5F
→
05/23 12:11, , 6F
05/23 12:11, 6F
→
05/23 15:26, , 7F
05/23 15:26, 7F