Monday, January 5, 2009

使用Eclipse的wsdl2java工具

一、用Eclipse调用Axis的wsdl2java
1.在eclipse里面新建一个项目或已有的项目;
2.导入
    activation.jar
    axis.jar
    commons-discovery.jar
    commons-logging-1.0.3.jar
    jaxrpc.jar
    saaj.jar
    wsdl4j-1.5.2.jar
   包

3右击你的工程-Run As-Run...-右击New,新建 new configuration ,将Include libraries when searching for a main class勾上,再点search,输入wsdl2java,再Arguments里把要生成的web service URI或wsdl文件写进去,最后点run。

二、利用myeclipse建立WebServiceClient
1.在Web工程上右键-->new-->Other-->MyEclipse下的WebService下的Web Service Client
2.在打开窗口上的Project处选择要放入哪个工程,然后选择WSDL URL,把WebService地址填上.也可以选择本地wsdl文件

No comments:

Post a Comment