2017-07-24 78 views
0

我无法访问属性部分中提到的资源属性test1WSO2 API管理器 - 无法访问资源属性

我试图通过使用表达式来访问它。 get-property('test1')。我期待在控制台的这个结果为test1-value。但是显示为nullenter image description here

更新

我曾尝试以下选项,但没有什么工作这个test1属性。

<property expression="get-property('registry', 'gov:/data/xml/[email protected]')" name="test_property2"/> 
<property expression="get-property('registry', 'gov:/_system/governance/apimgt/customsequences/in/[email protected]')" name="test_property4"/> 
<property expression="get-property('gov:/_system/governance/apimgt/customsequences/in/[email protected]')" name="test_property6"/> 
+0

请尝试https://stackoverflow.com/questions/11210545/loading-a-registry-entry-into-a-wso2-property-mediator – Pubci

回答

0

要获得test1值,使用下列财产。

<property expression="get-property('registry', 'gov:/apimgt/customsequences/in/[email protected]')" name="test_property5"/> 

从上面的例子中,资源的位置显示为/_system/governance/apimgt/customsequences/in/Seq1.xml。因此,为了使其路径,我们将使用子路径,并从一开始就离开/_system/governance。路径将是gov:/apimgt/customsequences/in/Seq1.xml。现在访问test1属性,只需将@test1附加到路径。