.Net中访问Axis2下的Web Services
来源:互联网 发布:2016年开淘宝店晚不晚 编辑:程序博客网 时间:2024/04/30 15:54
axis2是axis的第二代产品。关于axis2、axis和xfire在java web services圈中争论不休,不过在.Net中调用都一样的简单。
Tomcat下安装axis2就不多说了,把axis2.war包复制到tomcat的webapps下,输入地址http://192.168.92.101:8080/axis2/测试如果能出现axis2的页面,就基本OK了。可以再点一下上面的Services链接,当前可用的services只用一个version类,它提供了getVersion方法。下面来看.Net中怎么调用它吧。
我们在Web Application中调用这个web services,使用C#语言。
首先创建一个web应用,为应用添加web References,输入地址http://192.168.92.101:8080/axis2/services/version?wsdl,其中的?wsdl可不要丢了。输入web引用名为Version。
然后创建一个web form,添加Version引用,在Page_Load中输入如下代码:
version vv=new version();
Response.Write(vv.getVersion(new getVersion()).@return);
在axis2中,传递的参数不再是简单的数据类型,而是一个类结构的。在本例中,getVersion方法本身并没有传递实质的参数,但还是使用new getVersion()创建一个空的getVersion类型的参数。
运行后,会在页面中输出:
Hello I am Axis2 version service , My version is 1.0 May 05, 2006 (12:30:54 IST)
- .Net中访问Axis2下的Web Services
- Java用axis2调用.net发布的web services接口
- web services 之 axis2
- web services + axis2
- web services + axis2( 二 )
- Tomcat5+Axis2开发Web Services
- axis2开发web services实例
- axis2 web-inf/services目录
- .NET中Web Services可使用的传输协议设置
- Web Services学习3——用Axis2发布Web Services的方法
- 在J2ME中访问dotnet Web Services
- 在J2ME中访问dotnet Web Services
- J2ME中访问dotnet Web Services
- VS.NET中Web Services入门
- vs.net中web services入门
- POJO Web Services using Apache Axis2
- Axis2 Web服务配置文件services.xml详解
- Axis2 Web服务配置文件services.xml详解
- 好地方
- MD5算法说明
- MASM5命令行
- signal的全集和信号handler
- problem
- .Net中访问Axis2下的Web Services
- DataGrid中删除最后一页的记录时出错的解决办法
- C#中结构与类的区别
- const 和 readonly 的区别
- sql中CASE的用法
- Sissel经典的 should it matter
- 很久以前的一个sql面试题及答案
- SQL server与MDB数据库的数据交换问题
- left join/right join/inner join操作演示