开发者

wsdl2java doesn't produce any output

I'm fairly new to web services and I've successfully created a web service using axis2 and tomcat 7. Now I'm trying to create a client for the web service using wsdl2java. I'm working on Windows so the command I've been trying is this: C:\axis2-1.5.4\bin> wsdl2java -uri http://localhost:8080/axis2/services/MyService I've set开发者_如何学编程 the AXIS2_HOME, JAVA_HOME, CLASSPATH like this: AXIS2_HOME -> C:\axis2-1.5.4 JAVA_HOME -> C:\Program Files\Java\jdk1.7.0 set CLASSPATH=C:\axis2-1.5.4\lib\axis.jar;C:\axis2-1.5.4\lib\axis-ant.jar;C:\axis2-1.5.4\lib\commons-discovery-0.2.jar;C:\axis2-1.5.4\lib\commons-logging-1.0.4.jar;C:\axis2-1.5.4\lib\jaxrpc.jar;C:\axis2-1.5.4\lib\log4j-1.2.8.jar;C:\axis2-1.5.4\lib\saaj.jar;C:\axis2-1.5.4\lib\wsdl4j-1.5.1.jar;C:\axis2-1.5.4\lib\activation.jar;C:\axis2-1.5.4\lib\mailapi.jar

My problem is that this: C:\axis2-1.5.4\bin> wsdl2java -uri http://localhost:8080/axis2/services/MyService doesn't produce any output at all in the console and doesn't create the stub class. I've no idea what I'm doing wrong here. I've tried other wsdl files as well and same thing happens. I would really appreciate any suggestions. Thanks!


Try adding "?wsdl" to the end of the URI: http://localhost:8080/axis2/services/MyService?wsdl. That's the correct form for a URL that returns the WSDL.

Aside from that, the wsdl2java reference says that -uri should name a file on the local filesystem. It may be that HTTP URLs aren't supported.


wsdl2java tools supports http url. But I also think that the problem here is that you URL does not point to the wsdl file (which should be ?wsd)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜