我们可以使用 Xpath 表达式设置发送中介吗 [英] Can we Set a Send mediator with Xpath expression

查看:25
本文介绍了我们可以使用 Xpath 表达式设置发送中介吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向我的电子邮件发送消息,因为我正在使用发送调解器以及我在 AXIS2 文件中设置所需的配置

i am trying to send a message to my email for that i am using send mediator as well i setup required configurations in AXIS2 file

它是否适用于以下代理如果不是,让 xpath 发送调解器的方法是什么

is it work for below proxy if not what is the way to give xpath to send mediator

<proxy xmlns="http://ws.apache.org/ns/synapse" name="mailCheck" transports="http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="Subject" value="Alert Message From WSO2 ESB - Service Down !!!" scope="transport" type="STRING"/>
         <property name="messageType" value="text/html" scope="axis2" type="STRING"/>
         <property name="ContentType" value="text/html" scope="axis2" type="STRING"/>
         <property name="Mail" value="mailto:faisal.shaik@youtility.in" scope="default" type="STRING"/>
         <log level="full">
            <property name="Mail" value="mailto:faisal.shaik@youtility.in"/>
         </log>
         <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
         <send>
            <endpoint key-expression="get-property('Mail')"/>
         </send>
      </inSequence>
      <outSequence/>
   </target>
   <description></description>
</proxy>

如果需要任何更改请告诉我

if need any changes pls let me know

推荐答案

你可以使用这个:

<property name="To" expression="get-property('uri.var.to')" scope="transport"/>
<send>
    <endpoint>
        <address uri="mailto:"/>
     </endpoint>
</send>

这篇关于我们可以使用 Xpath 表达式设置发送中介吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆