高分求购WEB SERVICES项目源码,作参``学习学习

xhunanpp 2004-04-11 11:49:18
高分求购WEB SERVICES项目源码,作参``学习学习

请问网上有没有WEB SERVICES项目源码下载,作学习用的,
...全文
96 29 打赏 收藏 转发到动态 举报
写回复
用AI写文章
29 条回复
切换为时间正序
请发表友善的回复…
发表回复
favornwpu 2004-04-17
  • 打赏
  • 举报
回复
up
favornwpu 2004-04-17
  • 打赏
  • 举报
回复
up
xinyu_1980 2004-04-17
  • 打赏
  • 举报
回复
UP
xinyu_1980 2004-04-17
  • 打赏
  • 举报
回复
UP
taosihai1only 2004-04-17
  • 打赏
  • 举报
回复
up
ghost225 2004-04-17
  • 打赏
  • 举报
回复
up
cutezww 2004-04-17
  • 打赏
  • 举报
回复
Microsoft Visual Studio .NET 2003\Enterprise Samples\有
活靶子哥哥 2004-04-17
  • 打赏
  • 举报
回复
╭═══╮ ╭═══╮ ╭══════╮   
╰╮ ╭╯ ╰╮ ╭╯ ╰╮ ╭══╮╰╮  
 ║ ║   ║ ║   ║ ║  ╰╮╰╮ 
 ║ ║   ║ ║   ║ ║   ║ ║ 
 ║ ║   ║ ║   ║ ║  ╭╯╭╯ 
 ║ ║   ║ ║   ║ ╰══╯╭╯  
 ║ ║   ║ ║   ║ ╭═══╯   
 ║ ║   ║ ║   ║ ║       
 ╰╮╰╮ ╭╯╭╯   ║ ║       
  ╰╮╰═╯╭╯   ╭╯ ╰╮      
   ╰═══╯    ╰═══╯
xueqs 2004-04-17
  • 打赏
  • 举报
回复
mark
i三千 2004-04-17
  • 打赏
  • 举报
回复
up
pycys001 2004-04-17
  • 打赏
  • 举报
回复
我都不错过
flashworld 2004-04-16
  • 打赏
  • 举报
回复
给我你的E-Mail
xhunanpp 2004-04-16
  • 打赏
  • 举报
回复
gengwei80(唐伯虎点秋香) ( )
你哪是用脚本调用,我是有两个数据库 ,就是两个服务端的数据交换,
你哪种做法不是我所说的,
xhunanpp 2004-04-16
  • 打赏
  • 举报
回复
土匪头 兄: 我的MSN/EMAIL : xhunanpp@hotmail.com 非常感谢
lingyun_k 2004-04-16
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2969/2969445.xml?temp=.353985
stillwaterrunsdeep 2004-04-16
  • 打赏
  • 举报
回复
土匪头大哥,我的email:zhangtaomaster@163.com,拜托也给我发一份。
listhome 2004-04-16
  • 打赏
  • 举报
回复
我也想要!帮你UP一下!楼主收到了发给我一份好吗?谢谢!!
wolftop 2004-04-16
  • 打赏
  • 举报
回复
http://www.csharphelp.com/
http://www.codeproject.com/dotnet/
有很多经典的!~去看看吧~不过是E文的!~
gengwei80 2004-04-15
  • 打赏
  • 举报
回复
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.OleDb;
using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace Service
{
/// <summary>
/// Service 的摘要说明。
/// </summary>
public class Service : System.Web.Services.WebService
{
public string ConnectionString;
public OleDbConnection Conn;
// public Int32 RecordCount;
public Service()
{
//CODEGEN: 该调用是 ASP.NET Web 服务设计器所必需的
InitializeComponent();
string ConnectionString;
ConnectionString="PROVIDER=SQLOLEDB;Data Source=GISWEB;Initial Catalog=JYJD;User ID=sa;Password=;";
Conn = new OleDbConnection(ConnectionString);
}
[WebMethod(Description="")]
public DataSet GetUserList(int userid)
{
// int i;
OleDbCommand MyCommand = new OleDbCommand("p_LoadUser",Conn);
MyCommand.CommandType = CommandType.StoredProcedure;
OleDbParameter MyPara;
MyPara = MyCommand.Parameters.Add("@userid", SqlDbType.Int);
MyCommand.Parameters["@userid"].Value = userid;
MyPara = MyCommand.Parameters.Add("@msgcount", SqlDbType.Int);
MyPara.Direction = ParameterDirection.Output;
// OleDbDataReader DbCommand = MyCommand.ExecuteReader();
OleDbDataAdapter DbCommand = new OleDbDataAdapter();
DbCommand.SelectCommand = MyCommand;
// RecordCount = (Int32)MyCommand.Parameters["@msgcount"].Value;
DataSet ds = new DataSet();
DbCommand.Fill(ds,"table");
return ds;
// OleDbDataAdapter MyCommand = new OleDbDataAdapter("exec loaduser "+userid,Conn);
// DataSet ds = new DataSet();
// MyCommand.Fill(ds,"table");
// return ds;
}

#region 组件设计器生成的代码

//Web 服务设计器所必需的
private IContainer components = null;

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{

}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion



}
}

客户端调用
<html>
<head>
<script language="JavaScript">
var iCallID;
var service_MsgXML = new ActiveXObject("MSXML.DOMDocument");
function init()
{
service.useService("http://gengw/jyjd/service/service.asmx?WSDL","service");
iCallID = service.service.callService("GetUserList",7);
}


</script>
</head>
<body onload="init()">
<div id="service" style="behavior:url(http://gengw/chat/webservice.htc)" onresult="onWSresult()">
</div>
<SCRIPT language="JavaScript1.2">
function onWSresult()
{
if((event.result.error)&&(iCallID==event.result.id))
{
var xfaultcode = event.result.errorDetail.code;
var xfaultstring = event.result.errorDetail.string;
var xfaultsoap = event.result.errorDetail.raw;
alert(xfaultstring);
// Add code to output error information here
}
else
{
var xmlResult = event.result.raw.xml;
// var result = event.result.value;
// alert(result);
if (xmlResult != "" && xmlResult != null)
{

service_MsgXML.loadXML(xmlResult);
maxNum = service_MsgXML.getElementsByTagName("msgcontent").length
column=service_MsgXML.getElementsByTagName("msgcontent").item(0).childNodes
alert(maxNum);
service_ChatMsgs.innerHTML = "";
for (m=0;m<=maxNum-1;m++){
//for(x in service_MsgXML.documentElement.childNodes)
//alert("The method returned the result : " + xmlResult);
// service_ChatList.innerText = service_MsgXML.selectSingleNode("//msgtime").text;
// service_ChatList.scrollTop = 2000;
// mName=column.item(m).tagName;
service_ChatMsgs.innerHTML += service_MsgXML.getElementsByTagName("msgtime").item(m).text+":<br>";
service_ChatMsgs.innerHTML += service_MsgXML.getElementsByTagName("msgcontent").item(m).text+"<br>";
//service_ChatMsgs.innerHTML += "<br>";
//service_ChatMsgs.innerHTML += service_MsgXML.selectSingleNode("//msgcontent").text;
//service_ChatMsgs.scrollTop = 2000;
}
}
window.setTimeout('iCallID = service.service.callService("GetUserList",7);',3000);
}
}
</script>
<Div id="service_ChatMsgs" style="Height:100%;Width:100%;Overflow:Auto;"></Div>
</body>
</html>

wangyagang 2004-04-15
  • 打赏
  • 举报
回复
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace PCSWebSrv3
{
/// <summary>
/// Summary description for Service1.
/// </summary>
public class Service1 : System.Web.Services.WebService
{
public AuthenticationToken AuthenticationTokenHeader;

public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion

// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5

[WebMethod]
public Guid Login(string userName, string password)
{
if ((userName == "Karli") && (password == "Cheese"))
{
Guid currentUser = Guid.NewGuid();
Application["currentUser"] = currentUser;
return currentUser;
}
else
{
Application["currentUser"] = Guid.Empty;
return Guid.Empty;
}
}

[WebMethod]
[SoapHeaderAttribute("AuthenticationTokenHeader",
Direction = SoapHeaderDirection.In,
Required = true)]
public string DoSomething()
{
if ((AuthenticationTokenHeader.InnerToken == (Guid)Application["currentUser"]) && (AuthenticationTokenHeader.InnerToken != Guid.Empty))
{
return "Authentication OK.";
}
else
{
return "Authentication failed.";
}
}
}
}
加载更多回复(8)

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧