Axis2发布webservice过程 和Axi af16 s2调用wsdl 及遇到的问题
2018-03-14 18:34
543 查看
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包
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包
相关文章推荐
- WebService发布与调用问题:expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/wsdl/}def
- WebService发布与调用问题:expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/wsdl/}definitions
- 在与sap系统集成时遇到的问题.sap系统发布一webservice,java(xfire)作为客户端调用,调用时抛出如下异常: Wrong Content-Type and empty HTTP-Body received: ("HTTP Code 20
- 调用xfire发布的wsdl遇到的问题
- 四、 用axis2的辅助工具发布、调用WebService
- PI-webservice06-调用外部webservice过程中注意问题
- axis2 WebService的发布与调用
- 对调用了TypeMock.net的代码进行调试遇到的怪问题--在vs.net中启动resharper自带的unit test的过程和方式是什么样的?
- 简单对象访问协议(Simple Object Access Protocol),PHP调用SOAP过程中的种种问题;php的soap无故出错的真凶:wsdl缓存
- 解决cxf+bboss发布的webservice缺少<wsdl:types>和<wsdl:message>标签的问题
- webService发布和调用--Axis2
- 关于asp调用webservice遇到的问题
- 四、 用axis2的辅助工具发布、调用WebService
- vs2008发布项目,放到服务器上使用的全过程及其遇到的问题
- ajax请求webservice的过程中遇到的问题总结
- Android通过ksoap调用webservice遇到的问题及解决之道全纪录
- 调用webservice遇到基础连接已关闭的问题
- 在CentOS上使用Neatbeans开发C++,调用Python的过程、遇到的问题和解决办法
- CXF动态客户端调用webservice实例 遇到的问题
- windows 2003 IIS 发布 WCF + Silverlight 发布过程可能会遇到几个问题的解决方法