在Eclipse中实现Web服务的错误。

huangapple go评论70阅读模式
英文:

Error in implementation of Web Service in eclipse

问题

在使用Tomcat作为服务器在Eclipse中创建Web服务时,我遇到了以下错误:

> IWAB0398E 从Java生成WSDL时出错:java.lang.ClassNotFoundException: 无法找到uk.ac.open.t320.Hello(由org.eclipse.jst.ws.axis.consumption.core_1.0.600.v201910301957引起)。

这是我的代码:

package uk.ac.open.t320;

public class Hello {
    public String helloName(String name)
    {
	    return "你好," + name;
    }
}
英文:

When I am creating a web service in eclipse with tomcat as the server, I am getting this error:

> IWAB0398E Error in generating WSDL from Java: java.lang.ClassNotFoundException: uk.ac.open.t320.Hello cannot be found by org.eclipse.jst.ws.axis.consumption.core_1.0.600.v201910301957.

This is my code-

package uk.ac.open.t320;

public class Hello {
    public String helloName(String name)
    {
	    return "Hello there"+ name;
    }
}

答案1

得分: 1

请参考此问题链接:https://stackoverflow.com/questions/45166063/error-in-generating-wsdl-from-java

右键点击 uk.ac.open.t320 -> 导出 -> Jar 文件 -> 导出到 /WEB-INF/lib

英文:

Refer to this question:https://stackoverflow.com/questions/45166063/error-in-generating-wsdl-from-java

Right click uk.ac.open.t320 -> Export->Jar file->export to /WEB-INF/lib

huangapple
  • 本文由 发表于 2020年9月23日 20:59:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/64028535.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定