问题描述
有没有什么方法可以在 WSO2 中按顺序获取 transport.vfs.FileURI 的值?例如我有一个像这样的代理 vfs
Is there any way to get the value of transport.vfs.FileURI in a sequence in WSO2?For example I have a proxy vfs like this
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file:///opt/temp/</parameter>
<parameter name="transport.vfs.FileURI">file:///opt/IDM/</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
然后我想按顺序获取transport.vfs.FileURI的值,可能是这样的:
Then I want to get the value of transport.vfs.FileURI in a sequence, maybe something like this :
<property xmlns:ns="http://org.apache.synapse/xsd"
name="fileuri"
expression="fn:concat('uri : ',get-property('transport', 'FILE_URI'))"
scope="default"
type="STRING"/>
我可以在 WSO2 序列中做这样的事情吗?
Can I do something like this in WSO2 sequence?
谢谢:)
推荐答案
不,不是这样,在代理中它被设置为服务级别参数.因此,在代理序列中,您需要设置具有相同值的属性,然后再次尝试访问该属性.但我认为,您可以使用类调解器来实现这一点,其中访问axis2 serviceMessagecontext,并读取服务级别参数.(虽然不确定)
No, not like that, in the proxy it is set as service level parameter. so, in the sequence of the proxy you need to set a property with the same value, and again try to access that property.But i think, you can achieve this using a class mediator, where access the axis2 serviceMessagecontext,and read service level parameters. (though not sure)
这篇关于如何在序列 WSO2 中获取属性 transport.vfs.FileURI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!