WSO2 API 管理员 - 无法访问资源属性
WSO2 API Manager - unable to access resource properties
我无法访问资源 属性 test1
,在屏幕截图的 属性 部分中提到。
我正在尝试使用表达式访问它。 get-property('test1')
。我希望控制台中的结果为 test1-value
。但是显示为 null
.
已更新
我尝试了以下选项,但没有任何效果 test1
属性。
<property expression="get-property('registry', 'gov:/data/xml/collectionx@test1')" name="test_property2"/>
<property expression="get-property('registry', 'gov:/_system/governance/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property4"/>
<property expression="get-property('gov:/_system/governance/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property6"/>
试试这个。
<property name="regProperty" expression="get-property('registry', 'gov:/data/xml/collectionx@abc')"/>
参考:http://movingaheadblog.blogspot.com/2015/09/wso2-esb-how-to-read-registry-property.html
要获取 test1
的值,请使用以下 属性.
<property expression="get-property('registry', 'gov:/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property5"/>
在上面的示例中,资源的位置显示 /_system/governance/apimgt/customsequences/in/Seq1.xml
。所以为了制作它的路径,我们将使用子路径并从一开始就留下 /_system/governance
。路径将为 gov:/apimgt/customsequences/in/Seq1.xml
。现在要访问 test1
属性,只需将 @test1
附加到路径即可。
我无法访问资源 属性 test1
,在屏幕截图的 属性 部分中提到。
我正在尝试使用表达式访问它。 get-property('test1')
。我希望控制台中的结果为 test1-value
。但是显示为 null
.
已更新
我尝试了以下选项,但没有任何效果 test1
属性。
<property expression="get-property('registry', 'gov:/data/xml/collectionx@test1')" name="test_property2"/>
<property expression="get-property('registry', 'gov:/_system/governance/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property4"/>
<property expression="get-property('gov:/_system/governance/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property6"/>
试试这个。
<property name="regProperty" expression="get-property('registry', 'gov:/data/xml/collectionx@abc')"/>
参考:http://movingaheadblog.blogspot.com/2015/09/wso2-esb-how-to-read-registry-property.html
要获取 test1
的值,请使用以下 属性.
<property expression="get-property('registry', 'gov:/apimgt/customsequences/in/Seq1.xml@test1')" name="test_property5"/>
在上面的示例中,资源的位置显示 /_system/governance/apimgt/customsequences/in/Seq1.xml
。所以为了制作它的路径,我们将使用子路径并从一开始就留下 /_system/governance
。路径将为 gov:/apimgt/customsequences/in/Seq1.xml
。现在要访问 test1
属性,只需将 @test1
附加到路径即可。