ASMX Web服务 - "此Web服务使用http://tempuri.org/作为默认命名空间"。消息 - 但它不应该 [英] ASMX Web Service - "This web service is using http://tempuri.org/ as its default namespace." message - but it shouldn't be

查看:1869
本文介绍了ASMX Web服务 - "此Web服务使用http://tempuri.org/作为默认命名空间"。消息 - 但它不应该的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建使用Visual Studio的Web服务(2005年 - 我知道我的老同学),这一切编译罚款,但打开时我得到这样告诫:

I've created a web service using Visual Studio ( 2005 - I know I'm old school ) and it all compiles fine but when it opens I get warned thus:

本网站服务不符合WS-I Basic Profile的1.1版。

This web service does not conform to WS-I Basic Profile v1.1.

和此外:

这Web服务使用的http:// tempuri。 。组织/ 作为默认命名空间。

This web service is using http://tempuri.org/ as its default namespace.

这将是除了我的服务精细这样开始:

Which would be fine except my service begins thus:

 [WebService(Namespace = "http://totally-not-default-uri.com/servicename")]

搜索整个解决方案文件夹tempuri什么都不返回。我找不到它的任何配置页面从Visual Studio acessible提及。但它是正确的,在WSDL中:定义列表中的xmlns:TNS Web服务描述符页面上的属性,当我通过浏览器和目标名称在同一个标​​签查看。我使用Visual Studio的调试模式,内置的服务器从查看它。

Searching the entire solution folder for "tempuri" returns nothing. I can't find it mentioned in any configuration page acessible from Visual Studio. And yet it's right there in the wsdl:definitions list for the xmlns:tns attribute on the web service descriptor page when I view it through the browser and as targetNamespace in the same tag. I'm viewing it using Visual Studio's "debug" mode with the built in server from that.

好像事情已经得到了缓存的地方,但我不知道是什么以及如─我试着停止和重新启动服务器,清理和重建服务,并通过相关的文本配置文件会用文本编辑器,但没有骰子。任何想法是怎么回事?

Seems like something has got cached somewhere but I can't work out what and where- I've tried stopping and restarting the server, cleaning and rebuilding the service and going through the associated text config files with a text editor but no dice. Any idea what is going on?

推荐答案

咳咳。

过了一会儿,试图找出这一个,我马上回起点,开始质疑我的假设。通常在这种情况下,如果没有人似乎有一个答案,我做的事情真的很密集。

After a while trying to figure this one out, I got right back to the start and began questioning my assumptions. Usually in this kind of situation if nobody seems to have an answer I am doing something really dense.

果然,我有几个班在我的Web服务文件(因为它是一个用于测试的存根,并不会在长期使用),我已经完全在我的.asmx文件作为Web服务的支持代号为错误的类。

Sure enough, I have a couple of classes in my Web Service file ( because it's a stub for testing and will not be used in the long term ) and I had completely the wrong class named in my .asmx file as the supporting code for the web service.

在我纠正了,一切正常。

Once I corrected that, everything worked fine.

我不感到自豪,这是远从我最自豪的时刻,但我会为了以防万一有人离开这个否则运行到同样的问题...

I'm not proud, it's far from my proudest moment, but I'll leave this just in case anyone else runs into the same problem...

这篇关于ASMX Web服务 - "此Web服务使用http://tempuri.org/作为默认命名空间"。消息 - 但它不应该的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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