日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

JBoss5开发web service常见问题

發布時間:2025/3/8 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 JBoss5开发web service常见问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

最近在研究EJB3,在使用EJB3的Web service的時候遇到了不少棘手的問題,現在總結常見問題與大家分享,希望您能少浪費些時間去漫天地搜解決方案,具體見下:

1.
服務器端錯誤信息:
jboss5 java.lang.NoClassDefFoundError: org/apache/xerces/xs/XSModel

癥狀:
(JBoss5.1內有此現象)在控制臺啟動則可以正常部署,在eclipse內則報錯。

解決方法:
很可能是在添加服務器的時候選擇了eclipse的JBoss插件,位置:JBoss->JBoss V5.0,改為JBoss Tool插件內的JBossAS Tool插件,位置:JBoss Community->JBoss AS V5.1

2.
(JBoss5.1內有此現象)
客戶端調用報錯,
當使用JBossWS調用Webservice時報錯如下兩個異常交替出現:
javax.xml.ws.WebServiceException: No Content-type in the header

javax.xml.ws.WebServiceException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage

當使用Axis是報錯如下:
org.xml.sax.SAXParseException: Premature end of file.

原因及解決辦法:
把JBoss4.2內的JBOSS_HOME/client目錄下的一下文件復制到JBoss5.1內的JBOSS_HOME/lib/endorsed目錄下,重啟服務就可以了。
jboss-jaxrpc.jar
jboss-jaxws.jar
jboss-jaxws-ext.jar
jboss-saaj.jar

另一種做法是下載JBoss5.1的jdk1.6版本。

參考如下:
I read the release notes for Jboss as 4.2.3.GA and it describes what to do if running webservies using jdk1.6. Here is what helped me: (taken from the release notes and followed exactly as printed)

* JBossAS 4.2.3.GA can be compiled with both Java5 & Java6. The Java5 compiled binary is our primary/recommended
binary distribution. It has undergone rigorous testing and can run under both a Java 5 and a Java 6 runtime. When
running under Java 6 you need to manually copy the following libraries from the JBOSS_HOME/client directory to
the JBOSS_HOME/lib/endorsed directory, so that the JAX-WS 2.0 apis supported by JBossWS are used:
????????? o jboss-jaxrpc.jar
????????? o jboss-jaxws.jar
????????? o jboss-jaxws-ext.jar
????????? o jboss-saaj.jar

?

轉載于:https://www.cnblogs.com/zhmore/archive/2010/10/15/1852434.html

總結

以上是生活随笔為你收集整理的JBoss5开发web service常见问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。