生成元数据时出错

本文关键字:出错 元数据 | 更新日期: 2023-09-27 18:35:18

class myremoteobject:MarshalByRefObject 
{
    public myremoteobject()
    {
        Console.WriteLine("hi there");
    }
}
class Program
{
    static void Main(string[] args)
    {
        HttpChannel chn = new HttpChannel(1234);
        ChannelServices.RegisterChannel(chn, false);
        RemotingConfiguration.RegisterWellKnownServiceType(typeof(myremoteobject), "abc", WellKnownObjectMode.Singleton);
        Console.WriteLine("server started.... press any key to stop");
        Console.ReadLine();
    }
}

我有这些简单的类,但是当我尝试使用肥皂工具从中生成元数据时像这样:- soapsuds -ia:server -nowp -oa:metadata.dll

我收到错误

错误:架构数据无效,没有与 SOAP、RPC 和编码元素的绑定

生成元数据时出错

我过去曾收到过此错误,因为肥皂.exe期望与 ASP.NET 提供的编码不同。 在这种情况下,wsdl.exe为我工作。 这是远程处理(肥皂.exe)和Web服务(wsdl.exe)之间的区别。