[英]Generate Web Service Skeleton (Server Side artifacts) using wsimport
I have written a wsdl file and trying to generate server side artifacts to provide the actual business logic.我编写了一个 wsdl 文件并尝试生成服务器端工件以提供实际的业务逻辑。
but I am failed to generate server side artifacts但我无法生成服务器端工件
I am using the below command我正在使用以下命令
wsimport -keep -d Employee.wsdl wsimport -keep -d Employee.wsdl
Its not generating the service class with business method(Operation).它没有使用业务方法(操作)生成服务类。 It looks its generating the client artifacts instead server .
它看起来生成客户端工件而不是 server 。
Can anybody help me to solve this?有人可以帮我解决这个问题吗?
I came across this issue.我遇到了这个问题。 It looks like wsimport tool generates both client and service stub.
看起来 wsimport 工具会生成客户端和服务存根。 The service interface class gets the name of "portType" in wsdl file:
服务接口类在 wsdl 文件中获取“portType”的名称:
<wsdl:portType name="XPortType">
Then in generated XPortType.java you can see web service annotation:然后在生成的 XPortType.java 中,您可以看到 Web 服务注释:
@WebService(name = "XPortType" ...
public interface XPortType {
You can create your service implementation class as follows:您可以按如下方式创建服务实现类:
public class XServiceImpl implements XPortType
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.