如何WSDL转换成Java? [英] How to convert wsdl to java?

查看:257
本文介绍了如何WSDL转换成Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WSDL文件,我需要将其转换成Java,所以为了这个,我用一步一步的过程,从下面的链接

I've a WSDL file and i need to convert it into java, so for this i use step by step procedure from below link

<一个href="http://axis.apache.org/axis2/java/core/tools/eclipse/wsdl2java-plugin.html">http://axis.apache.org/axis2/java/core/tools/eclipse/wsdl2java-plugin.html

如添加的Axis2 codeGEN jar文件到的dropins文件夹中的日食文件夹,重新启动Eclipse的,但我没有得到Axis2的精灵在我的Eclipse IDE,所以任何一个plz帮助我走出了这一点。

like adding axis2 codegen jar file into dropins folder in eclipse folder and restarted eclipse but i didn't get "Axis2 Wizard" in my eclipse IDE, so any one plz help me to get out of this.

谢谢, @nagaraju。

Thanks, @nagaraju.

推荐答案

最近我转换一个WSDL文件到Java code。我试着Axis2的插件与我的Eclipse靛蓝和失败。我尝试了很多方法,但失败了。浪费了我的precious的时间和精力。我想建议你一个简单的方法,我成功了。

Recently I have to convert a WSDL file to Java code. I tried Axis2 Plugins with my Eclipse-Indigo and failed. I tried it in many ways but failed. Wasted my precious time and energy. I would like to suggest you one easy way i succeeded.

  1. 创建Java项目:文件 - >新建 - >其他 - > Java项目。 (假设我把它命名为TestWSDL)
  2. 创建WSDL文件:文件 - >新建 - >其他 - >网络服务 - > WSDL文件 - >命名文件 - >下一步 - >完成。 (假设我把它命名为NewWSDLFile.wsdl)
  3. 修改WSDL文件:打开NewWSDLFile.wsdl和您所需的WSDL替换其所有的内容file.Save它。 (假设我有救了我想要的WSDL文件在D:\ sampleWSDL.xml,我要转换打开使用记事本++这个XML文件,复制其所有的内容并粘贴到NewWSDLFile.wsdl)
  4. 创建Web服务客户端:文件 - >新建 - >其他 - >网络服务 - > Web服务客户端 - >下一步 - >浏览服务的定义,并显示NewWSDLFile.wsdl文件的路径,我们>确定 - >点击客户端项目(如右图蓝色链接),并将其设置为我们在步骤1中创建项目
  5. - 在步骤2中创建
  6. preSS下一步 - >设置输出文件夹 - >完成
  7. 您将所有的转换后的Java文件,你在步骤5中设置的文件夹。
  1. Create a Java Project: File->New->Other->Java Project. (Suppose I named it TestWSDL)
  2. Create a WSDL File: File->New->Other->Web Services->WSDL File-> Name the file->Next->finish. (Suppose I named it NewWSDLFile.wsdl)
  3. Modify the WSDL File: Open NewWSDLFile.wsdl and replace all its content by your desired WSDL file.Save it. (Suppose I have saved my desired wsdl file at D:\sampleWSDL.xml, which i want to convert. Open this xml file using Notepad++,copy all its content and paste it to NewWSDLFile.wsdl)
  4. Create Web Service Client: File->New->Other->Web Services->Web Service Client->Next->Browse Service definition and show the path of the NewWSDLFile.wsdl file we created at step 2 ->OK-> Click Client Project(blue colored link at right) and set it to the project we created at step 1.
  5. Press Next -> Set Output Folder->Finish.
  6. You will have all the converted Java files at the folder you set at step 5.

这篇关于如何WSDL转换成Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆