相关疑难解决方法(0)

XML中的"xmlns"是什么意思?

我在XML文件中看到以下行:

xmlns:android="http://schemas.android.com/apk/res/android"
Run Code Online (Sandbox Code Playgroud)

xmlns在许多其他XML文件中也看到了我遇到过的问题.

它是什么?

xml xml-namespaces

400
推荐指数
4
解决办法
26万
查看次数

什么导致Web服务URL和命名空间之间的差异?

我有一个包含Web服务的ASP.NET Web项目.当我运行该服务时,它会将我带到一个页面,显示所有暴露的方法,使用类似的URL http://api.example.com/game/service.asmx.

在Web Service的代码中,有些方法具有以下属性:

    [WebService(Namespace = "http://webservices.example.com/GameServices/Game1")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class Game1 : System.Web.Services.WebService
    {
        // code 
    }
Run Code Online (Sandbox Code Playgroud)

我对为什么带有webService属性的类上的命名空间与Web服务的路径不同有点困惑.该命名空间来自哪里?它刚刚组成吗?

c# web-services asmx xml-namespaces

13
推荐指数
1
解决办法
2万
查看次数

标签 统计

xml-namespaces ×2

asmx ×1

c# ×1

web-services ×1

xml ×1