简体   繁体   English

如何使用wsdl2java创建Java代码?

[英]How to use wsdl2java created Java code?

I have a WSDL file using which I have generated server side classes in JAVA using axis2-eclipse-codegen-plugin-1.5.4 and Axis 2 Service plugin .我有一个 WSDL 文件,我使用该文件在 JAVA 中使用axis2-eclipse-codegen-plugin-1.5.4Axis 2 Service plugin生成了服务器端类。 The classes are created but I don't know how to use those classes and I cann't figure out which from all those classes is the main class.创建了这些类,但我不知道如何使用这些类,而且我无法确定所有这些类中哪个是主要的 class。 It has generated many other methods which I m unable to understand.它产生了许多我无法理解的其他方法。

Now, I have to modify those classes for so that the service, when published, can send dummy data to client(I have to enter business logic).现在,我必须修改这些类,以便服务在发布时可以向客户端发送虚拟数据(我必须输入业务逻辑)。 I am unable to do so.我无法这样做。 Can any body help/ any tutorials which can help.任何机构都可以提供帮助/任何可以提供帮助的教程。

You can start from this Axis2 tutorials and articles您可以从这个Axis2 教程和文章开始

If your setup will support it, starting with ejb3, writing basic beans and letting the server generate the wsdl on the fly might be easier.如果您的设置支持它,从 ejb3 开始,编写基本 bean 并让服务器即时生成 wsdl 可能会更容易。 I've done this with glassfish3 and it worked really well.我已经用 glassfish3 完成了这项工作,效果非常好。

Check out this tutorial: Developing Web Services Using Apache Axis2 Eclipse Plugins .查看本教程:使用 Apache Axis2 Eclipse 插件开发 Web 服务 It is using an older version of the Axis2 Eclipse Plugin (1.3 when you are using 1.5.4), but hopefully the same steps apply, or you can figure them out based on the old tutorial.它使用的是旧版本的 Axis2 Eclipse 插件(当您使用 1.5.4 时为 1.3),但希望相同的步骤适用,或者您可以根据旧教程找出它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM