1.导入axis2 所有jar包
2.写好java代码,准备发布
3.axis2 发布webservice
选择到bin下
发布的是impl,
文件只能在一层文件夹下
C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\axis2\WEB-INF\services
3. 查看 http://localhost:8080/axis2/services/listServices
4.拷贝下来
5.调用webservice
C:\Java\jdk1.6.0_43\bin> wsimport -keep -s C:\Users\zackary\Documents\eclipseDaan2 -p com.cn.nc -verbose C:\Users\zackary\Documents\eclipseDaan2\Axis2Service_client\ncService.wsdl
执行代码:
import com.cn.nc.OrclDaoImpl;
import com.cn.nc.OrclDaoImplPortType;
public class ServiceTest {
public static void main(String[] args) {
OrclDaoImpl orclDaoImpl =new OrclDaoImpl();
OrclDaoImplPortType portType = orclDaoImpl.getOrclDaoImplHttpSoap11Endpoint();
portType.selectOneOrcl("00015835");
}
}
——————————————————————————————————————————————
遇到的问题:
webservice java.lang.ClassNotFoundException: Class Not found : oracle.jdbc.driver.OracleDriver
需要在tomcat中导入jar包