首页 文章

WSO2 Governance Registry Endpoint Lookup示例远程用例

提问于
浏览
1

有一个Endpoint Lookup Sample与治理注册表,其中axis2服务使用治理注册表来查找另一个服务的 endpoints 地址 .

我想将axis2服务示例部署到WSO2应用程序服务器,并仍然使用相同的WSO2 Governance服务器来存储 endpoints 引用 . 请注意,Governance Registry现在远离应用程序服务器 .

Questions:

1) 我是否只需要使用RemoteRegistry替换示例EndpointLookupServiceComponent中的RegistryService?例如 .

public class EndpointLookupServiceComponent {

    private static RegistryService registryService;

    public EndpointLookupServiceComponent() {
        registryService = new RemoteRegistry(
             new URL("https://my-greg-server:9443/registry"), "admin", "admin");
    }
    ...
}

2) 以下值通常存储在Application Server中的哪个位置?

"https://my-greg-server:9443/registry"
"admin"
"admin"

是否可以将此类信息存储在属性文件中,该文件位于服务存档(aar)文件的外部?这种方法可以轻松更改不同环境(DEV,TEST,PRD等)的值 . 此外,可以使用文件系统访问控制来保护属性文件,以限制可以查看文件的人员 .

用于安全存储此类配置数据的标准WSO2方法是什么?

1 回答

  • 3
    • 是的,您需要使用RemoteRegistry实例来访问注册表 .

    • 执行此操作的一种方法是在WSO2 Application Server上使用Registry . 因此,您可以将凭据保存为注册表资源,并通过服务中的注册表API访问它 .

相关问题