Eclipse4.2 WTP向导不为AXIS2- Tomcat Webservice生成WSDL文件

时间:2012-09-23 11:15:15

标签: eclipse tomcat axis2 eclipse-wtp

我已按照tutorial中的步骤创建了Web服务。

一切正常,但没有生成WSDL文件!

我有一个动态WebProject,我创建了Webservice ....没有错误但没有生成wsdl文件

我也无法使用针对Eclipse的axis2 codegen pugin生成wsdl文件。我一直收到错误class not found exception

我的axis2 tomcat安装似乎正常工作 - 请参阅下面的我的axis2幸福页面....

我已经在stackoverflow中尝试了所有建议的灵魂,但没有成功!

我还能尝试使其工作.....

我的配置是:

面向Web开发人员的Eclipse Java EE IDE。 版本:Juno发布 建造ID:20120614-1722

Fedora 17x64 AXIS2 1.6.2 Tomcat 7

AXIS2安装似乎没问题:

Axis2 Happiness Page

Examining webapp configuration

Essential Components

Found Apache-Axis (org.apache.axis2.transport.http.AxisServlet) 
  at /home/pk/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/lib/axis2-transport-http-1.6.2.jar
Found Jakarta-Commons Logging (org.apache.commons.logging.Log) 
  at /home/pk/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/lib/commons-logging-1.1.1.jar
Found Streaming API for XML (javax.xml.stream.XMLStreamReader) 
  at an unknown location
Found Streaming API for XML implementation (org.codehaus.stax2.XMLStreamWriter2) 
  at /home/pk/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/lib/wstx-asl-3.2.9.jar
The core axis2 libraries are present.

Note: Even if everything this page probes for is present, there is no guarantee your Axis Service will work, because there are many configuration options that we do not check for. These tests are necessary but not sufficient

Examining Version Service

Found Axis2 default Version service and Axis2 is working properly.
Now you can drop a service archive in axis2/WEB-INF/services. Following output was produced while invoking Axis2 version service

Hi - the Axis2 version is 1.6.2

Examining Application Server

Servlet version 3.0
Platform    Apache Tomcat/7.0.12
Examining System Properties

java.runtime.name   OpenJDK Runtime Environment 
sun.boot.library.path   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/amd64 
java.vm.version 23.2-b09 
shared.loader    
java.vm.vendor  Oracle Corporation 
java.vendor.url http: //java.oracle.com/ 
path.separator  :  
java.vm.name    OpenJDK 64-Bit Server VM 
tomcat.util.buf.StringCache.byte.enabled    true 
file.encoding.pkg   sun.io 
user.country    DE 
sun.java.launcher   SUN_STANDARD 
sun.os.patch.level  unknown 
java.vm.specification.name  Java Virtual Machine Specification 
user.dir    /home/pk/Documents 
java.runtime.version    1.7.0_06-icedtea-mockbuild_2012_08_31_14_28-b00 
java.awt.graphicsenv    sun.awt.X11GraphicsEnvironment 
java.endorsed.dirs  /home/pk/Tomcat70/endorsed 
os.arch amd64 
java.io.tmpdir  /tmp 
line.separator    
java.vm.specification.vendor    Oracle Corporation 
java.naming.factory.url.pkgs    org.apache.naming 
os.name Linux 
sun.jnu.encoding    UTF-8 
java.library.path   /usr/java/packages/lib/amd64: /usr/lib64: /lib64: /lib: /usr/lib 
tomcat.util.scan.DefaultJarScanner.jarsToSkip   bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-*.jar,tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,commons-beanutils*.jar,commons-collections*.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-logging*.jar,commons-pool*.jar,ant.jar,jmx.jar,jmx-tools.jar,xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar 
java.specification.name Java Platform API Specification 
java.class.version  51.0 
sun.management.compiler HotSpot 64-Bit Tiered Compilers 
os.version  3.5.3-1.fc17.x86_64 
user.home   /home/pk 
user.timezone   Europe/Vienna 
catalina.useNaming  true 
java.awt.printerjob sun.print.PSPrinterJob 
java.specification.version  1.7 
file.encoding   UTF-8 
catalina.home   /home/pk/Tomcat70 
user.name   pk 
java.class.path /home/pk/Tomcat70/bin/bootstrap.jar: /home/pk/Tomcat70/bin/tomcat-juli.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/lib/tools.jar 
java.naming.factory.initial org.apache.naming.java.javaURLContextFactory 
package.definition  sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. 
java.vm.specification.version   1.7 
sun.arch.data.model 64 
java.home   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre 
sun.java.command    org.apache.catalina.startup.Bootstrap start 
java.specification.vendor   Oracle Corporation 
user.language   de 
awt.toolkit sun.awt.X11.XToolkit 
java.vm.info    mixed mode 
java.version    1.7.0_06-icedtea 
java.ext.dirs   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/ext: /usr/java/packages/lib/ext 
sun.boot.class.path /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/resources.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/rt.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/sunrsasign.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/jsse.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/jce.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/charsets.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/netx.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/plugin.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/rhino.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/jfr.jar: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/classes 
java.vendor Oracle Corporation 
server.loader    
catalina.base   /home/pk/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 
file.separator  / 
java.vendor.url.bug http: //bugreport.sun.com/bugreport/ 
common.loader   ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar 
sun.cpu.endian  little 
sun.io.unicode.encoding UnicodeLittle 
wtp.deploy  /home/pk/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps 
package.access  sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. 
sun.cpu.isalist 

1 个答案:

答案 0 :(得分:2)

10分钟前我遇到了同样的问题(几个小时)。我有一个动态的Web项目,我可以通过上下文菜单从java类创建一个Web服务。该服务部署到我的本地tomcat安装(包含axis2),但没有创建wsdl。

然后我右键点击我的项目并选择“run as” - > “在服务器上运行”。现在它显示“Apache Software Foundation”页面。它上面有一个“服务”链接。点击链接后,它会显示我已部署的Web服务的“可用服务”页面。然后我点击了我自己部署的Web服务,它显示了我正在搜索的wsdl。网址类似于:

http://localhost:8080/test/services/myservice?wsdl

“test”是我的项目名称。 wsdl不在我的eclipse“WEB-INF / wsdl”文件夹中(就像我到目前为止找到的每个教程)。但我只能通过上面的网址访问它。