我正在使用Eclipse 3.6(Helios)。我已经使用Ant任务wsgen
试过,但并不蚂蚁存在从JAX-WS 2.0实现中使用Eclipse(Helios)生成Web服务
我要生成从下面的示例代码Web服务的WSDL(我缺少什么?):
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
/**
* @author Buhake Sindi
* @since 19 July 2010
*
*/
@WebService(name="SampleWS")
@SOAPBinding
(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
)
public class SampleWSImpl implements SampleWS {
private static String userName;
/* (non-Javadoc)
* @see SampleWS#setUserName(java.lang.String)
*/
@WebMethod
@Override
public void setUserName(@WebParam(name="userName") String userName) {
// TODO Auto-generated method stub
this.userName = userName;
}
/* (non-Javadoc)
* @see SampleWS#getUserName()
*/
@WebMethod
@Override
public String getUserName() {
// TODO Auto-generated method stub
return userName;
}
}
使用Eclipse轴1.4 Web服务生成器,它工作正常。但是,我想彻底摆脱使用Axis 1。
在此先感谢。
PPS *如何设置Eclipse以使用Axis2?
运行良好的事情是Axis2上的Apache CXF。 – 2010-07-22 16:32:44