JBOSS 点滴

丰丰的博客

webservice错误集锦

在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下:

一:
It is indirectly referenced from required .class file

原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。

解决方法:导入缺失的包

二:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

出現以上訊息的原因是因為你裝了多個版本的jre或jdk的關係。本來Eclipse在建立專案時,會自動參照你的jre路徑,但多個版本就沒辦法了。
你只能手動建立…
1. 進入window\preferences\java\Installed JREs
1)按Add
2)輸入JRE Name, 例JDK1.5.0.03
3)JRE home directory, 選擇安裝的路徑
4)按OK
2. 進入Project\properties\Java Bulid Path
1)Add library
2)選JRE System Library後按Next
3)選workplace default JRE後按finish...

三,the type org.apache.axiom.soap.SOAPEnvelope cannot be resolved,it is indirectly referenced from required .class files
    当自动生成webservice程序时报的错误,最终解决办法为,把xis2_Codegen_Wizard_1.4.0\lib包全复制到build path下,问题全解决了.
问题:An error occurred while completing process,java.lang.reflect.InvocationTargetException
        当我用axis自动生成代码时,最后一步报的错,网上通常说的解决办法是

从AXIS2的LIB库中复制"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"文件到Codegen的lib目录中,同时修改plugin.xml文件,添加

<library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
         <export name="*"/>
</library>
<library name="lib/backport-util-concurrent-3.1.jar">
        <export name="*"/>
</library>

到plugin.xml文件中,保存后重新启动Eclipse即可!


但本人用这种办法,怎么试也不行,本人用的JDK1.4,自动生成代码插件为:Axis2_Codegen_Wizard_1.3.0
所以怎么试也行不通,最后本来换了个.Axis2_Codegen_Wizard_1.4.0问题终于解决.也整了一天了!

axis所需要的包:
Axis2_Codegen_Service_1.4.0_plugins 代码自动生成   新建工程时,记得把该文件夹下lib\.jar包全部导入.

获取XML
JDOM1.0\build\jdom.jar   要加载到lib中
记住,当你用JDK1.4时,所有的包都要下载后坠为1.4的包,不然会出些稀奇古怪的错误.

webservice操作步骤:
1,把Axis2_Codegen_Service_1.4.0_plugins拷贝到plugin下.
2,打开eclipse,新建文件时选择axis.
3,选择JWDL地址.
4,生成代码,
5,调用:

     TaskServiceStub ts = new TaskServiceStub();
     TaskServiceStub.GetTaskList gt = new TaskServiceStub.GetTaskList();
     gt.setPassword(usercode);
     gt.setUsercode(password);
     String sxml = ts.GetTaskList(gt).getGetTaskListResult();
四,java.net.SocketException: Software caused connection abort: socket write error
     at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:126)
这个问题,我一直找不到答案,希望各位高手能告诉我.

posted on 2010-09-30 17:01 半导体 阅读(448) 评论(0)  编辑  收藏 所属分类: Eclipse


只有注册用户登录后才能发表评论。


网站导航: