mule dynamically setting soap operation

被刻印的时光 ゝ 提交于 2020-01-16 03:49:06

问题


In my flow I have a soap client calling a service. Since we are using 3 different operations from the service I'd like to dynamically fill in the "Operation" field under "Client Attributes" in Mule soap component. The way I have it working right now is:

start flow -> message transformation -> choice flow control (based on the message type) 
choice 1. sub flow A -> soap client with operation A 
choice 2. sub flow B -> soap client with operation B 
choice 3. sub flow C -> soap client with operation C

What I would like is to dynamically in runtime set the "Operation" field based on the message and not have three different subflows.

start flow -> message transformation -> set the operation field -> soap client with the correct operation 

Is that possible? Using Mule CE 3.3.1. Thanks in advance.


回答1:


To achieve your goal:

  • Remove the operation attribute from the cxf:jaxws-client element,
  • Add set the operation as an outbound message property before the cxf:jaxws-client element with:

    <set-property propertyName="operation" value="#[...]" />
    

    where #[...] represents a MEL expression that extracts the operation name from the message.



来源:https://stackoverflow.com/questions/15533402/mule-dynamically-setting-soap-operation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!