先添加引用
打入这个服务的地址和名称,扩展名。
然后在需要调用的地方
dim myservice as yourservicename = new yoursevicename()
'此处调用
myservice.hello()
打入这个服务的地址和名称,扩展名。
然后在需要调用的地方
dim myservice as yourservicename = new yoursevicename()
'此处调用
myservice.hello()
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;namespace aspnetserver
{
public class Service1 : System.Web.Services.WebService
{
public Service1()
{
InitializeComponent();
} #region Component Designer generated code
//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
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}上面是服务程序
下面是引用,不知对不对
<%@ Import Namespace="localhost.webser.service1.asmx" %>
<html>
<body MS_POSITIONING="GridLayout">
<%
dim a as Service1=new Service1()
a.HelloWorld()
%>
</body>
</HTML>
编译器错误信息: BC30002: 未定义类型“Service1”。
请哪位高手帮我改改上面的引用
各调用吧
service.useService("../webservice9/ShortMessage.asmx?WSDL","wmjService");
我只在客户端调用