[英]WSDL file to Jar File
I have WSDL file URL and I want to create JAR file and need use in another project. 我有WSDL文件URL,我想创建JAR文件,需要在另一个项目中使用。
I have try to convert with below scenarios 我尝试使用以下方案进行转换
1.Using wsimport command to Java files and using this java files create maven project as packaging JAR 1.使用wsimport命令到Java文件并使用这个java文件创建maven项目作为打包JAR
wsimport -keep -wsdllocation /MyService.wsdl
wsimport -keep -wsdllocation /MyService.wsdl
2.Using ANT build (create build.xml file create target for export JAR) 2.使用ANT构建(创建build.xml文件为导出JAR创建目标)
<target name="dist" depends="compile" description="generate the distribution">
<buildnumber />
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib" />
MyApplication-${version}.${build.number}.jar -->
<jar destfile="${dist}/lib/MyApplication-${version}.${build.number}.jar" basedir="${build}" />
</target>
above both scenarios JAR exported but when I deployed in server getting below Exception 以上两种情况都是JAR导出的,但是当我在服务器中部署时,它会超出Exception
java.lang.NoClassDefFoundError
what I am doing wrong ? 我做错了什么? is there any simple way to convert wsdl to Jar?
有没有简单的方法将wsdl转换为Jar?
This Issue occur run time class not found. 此问题发生运行时类未找到。
I have add new Assembly in Eclipse -> specific project -> Web Deployment Assembly 我在Eclipse中添加了新的Assembly - >特定项目 - > Web Deployment Assembly
select specific JAR,WAR,RAR or ZIP file from path and set. 从路径和集中选择特定的JAR,WAR,RAR或ZIP文件。
and test again after this solved this issue. 并在此之后再次测试解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.