0

我已经配置了一台 Biztalk 服务器来运行 Microsfot UDDI 服务器。我将一个 Active Directory 组配置为 UDDI 的管理员组。

当我使用 UDDI Web 用户界面时,我可以创建提供者,也可以使用“查看拥有的数据”按钮查看其他用户拥有的数据(提供者、tmodel 等)。

我使用 C# 中的 Microsoft.Uddi3.dll API 创建了一个 Windows 表单对话框来管理客户端远程应用程序中的 UDDI 条目,并且我可以使用它来查看其他用户创建的提供程序,但对由拥有的提供程序进行的任何修改其他用户正在抛出 Microsoft.Uddi3.UserMismatchException(实体 uddi:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 不属于发布者),因为我不是真正的所有者,即使我是 UDDI 中的管理员。如果我对我创建的 Provider 使用它,则该版本运行良好。当我的用户不是创建提供程序的用户时,就会出现问题。

我看到 Web UI 在 UDDI.Web.DLL 下使用了一个名为 ViewAsPublisher.Set(string username) 的方法,该方法设置了您想要查看其数据的用户所有者,但我在客户端机器上使用它并没有成功。我认为这个 DLL 是为在服务器中使用而开发的,在客户端中使用没有意义,但我需要一些类似于 Web 用户界面中允许的功能。

Microsoft.Uddi3.dll 也提供了转移所有权的能力,但我只需要在 Web UI 中具有相同的行为,我的意思是直接修改提供程序,就像我是真正的所有者一样,就像我属于管理员一样,发布者或协调者组。

不知道是配置问题,还是Uddi3 API方法的限制。

谁能帮我?

提前致谢!!!

4

2 回答 2

0

大卫,听起来这是设计使然。乌迪女士确实支持访问控制规则。您必须提醒权限或以管理员身份登录才能更改不属于您的记录。

于 2014-10-05T22:43:05.717 回答
0

这是我们用来修改提供者的代码(例如名称和描述)。

我们使用与以下信息一起使用的 _connection 参数:

    private void ConnectToUddi()
    {
        if (!uddiServer.EndsWith("/"))
            uddiServer = uddiServer + "/";
        string inquireURL = uddiServer + "inquire.asmx";
        string publishURL = uddiServer + "publish.asmx";
        string extensionURL = uddiServer + "extension.asmx";

        UddiSiteLocation location = new UddiSiteLocation(inquireURL, publishURL, extensionURL);
        _connection = new UddiConnection(location);
        _connection.AutoGetAuthToken = true;
        _connection.AuthenticationMode = AuthenticationMode.WindowsAuthentication;
    }

然后,这里使用连接:

            BusinessEntity entity = tree.SelectedNode.Tag as BusinessEntity;
            GetBusinessDetail businessDetails = new GetBusinessDetail(entity.BusinessKey);
            BusinessDetail businessDet = businessDetails.Send(_connection);
            if (businessDet != null && businessDet.BusinessEntities.Count > 0)
            {
                BusinessEntity be = businessDet.BusinessEntities[0];
                ProviderProperties providerProperties = new ProviderProperties(be);
                if (providerProperties.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    be.Names[0].Text = providerProperties.ProviderName;
                    if (providerProperties.ProviderDescription.Length > 0)
                    {
                        Description description = new Description(providerProperties.ProviderDescription);
                        be.Descriptions.Clear();
                        be.Descriptions.Add(description);
                    }
                    else
                        be.Descriptions.Clear();
                    SaveBusiness saveBusiness = new SaveBusiness(be);
                    saveBusiness.Send(_connection);

                    BeginRefresh();  
                }
            }

它适用于我创建的提供程序,但是当其他用户尝试修改我的提供程序(例如名称)并使用 API 时,它会抛出 Microsoft.Uddi3.UserMismatchException。

谢谢!!!

于 2014-09-26T09:02:47.300 回答