在visual 2003中添加Web引用 [英] Add web reference in visual 2003

查看:52
本文介绍了在visual 2003中添加Web引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加网络参考时,我收到一条消息:

下载'http://113.160.93.198:9001/Ws_SendMessage/SendMessages.asmx'时出错。



操作已经超时。



支持以下操作。如需正式定义,请查看服务说明。



Sendmessage





------------------------------------------------ --------------------------------



这个网站service使用http://tempuri.org/作为其默认命名空间。

建议:在公开XML Web服务之前更改默认命名空间。

每个XML Web service需要一个唯一的命名空间,以便客户端应用程序将其与Web上的其他服务区分开来。 http://tempuri.org/可用于正在开发的XML Web服务,但已发布的XML Web服务应使用更永久的命名空间。



您的XML Web服务应该由您控制的命名空间标识。例如,您可以将公司的Internet域名用作命名空间的一部分。虽然许多XML Web服务命名空间看起来像URL,但它们不需要指向Web上的实际资源。 (XML Web服务名称空间是URI。)



对于使用ASP.NET创建的XML Web服务,可以使用WebService属性的Namespace属性更改默认名称空间。 WebService属性是应用于包含XML Web服务方法的类的属性。下面是一个将命名空间设置为http://microsoft.com/webservices/的代码示例:



C#



[WebService(Namespace =http://microsoft.com/webservices/)]

公共类MyWebService {

// implementation

}

Visual Basic.NET



< webservice(名称空间:> Public Class MyWebService

'实现

结束类

有关XML命名空间的更多详细信息,请参阅W3C关于XML命名空间的建议。



有关WSDL的更多详细信息,请参阅WSDL规范。



有关URI的更多详细信息,请参阅RFC 2396.



P / S:我补充说:[WebService(Namespace =http://tempuri.org/)]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1) ]

[System.ComponentModel.ToolboxItem(false)]

但在ConformsTo上有一个错误:'System.Web.Services.WebServiceBindingAttribute'没有包含'ConformsTo'的定义



请帮助我!

When I add a web references, I have a message:
There was an error downloading 'http://113.160.93.198:9001/Ws_SendMessage/SendMessages.asmx'.

The operation has timed-out.

The following operations are supported. For a formal definition, please review the Service Description.

Sendmessage


--------------------------------------------------------------------------------

This web service is using http://tempuri.org/ as its default namespace.
Recommendation: Change the default namespace before the XML Web service is made public.
Each XML Web service needs a unique namespace in order for client applications to distinguish it from other services on the Web. http://tempuri.org/ is available for XML Web services that are under development, but published XML Web services should use a more permanent namespace.

Your XML Web service should be identified by a namespace that you control. For example, you can use your company's Internet domain name as part of the namespace. Although many XML Web service namespaces look like URLs, they need not point to actual resources on the Web. (XML Web service namespaces are URIs.)

For XML Web services creating using ASP.NET, the default namespace can be changed using the WebService attribute's Namespace property. The WebService attribute is an attribute applied to the class that contains the XML Web service methods. Below is a code example that sets the namespace to "http://microsoft.com/webservices/":

C#

[WebService(Namespace="http://microsoft.com/webservices/")]
public class MyWebService {
// implementation
}
Visual Basic.NET

<webservice(namespace:> Public Class MyWebService
' implementation
End Class
For more details on XML namespaces, see the W3C recommendation on Namespaces in XML.

For more details on WSDL, see the WSDL Specification.

For more details on URIs, see RFC 2396.

P/S: I added : [WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
But have a error at ConformsTo: 'System.Web.Services.WebServiceBindingAttribute' does not contain a definition for 'ConformsTo'

Help me, Please!

推荐答案

请检查端口号( 9001)是否有效。
kindly check port number(9001) is valid or not.


这篇关于在visual 2003中添加Web引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆