我正在使用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