前几日研究Java调用DotNet WebService,找了好多资料竟然没有好用的.将2日的艰辛拿出来分享,希望对朋友们有帮助。
.Net开发环境: VS DotNet 2005
Java开发环境:Eclipse3.1+JDK1.6+Axis1.4+mail.jar+ activation.jar
第一部分 服务器端.Net WebService开发
文件-〉新建-〉网站,选择Asp.net Web服务,建立WebService服务
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://www.my.com/Rpc")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {