mule动态设置soap操作 [英] mule dynamically setting soap operation
问题描述
在我的流程中,我有一个调用服务的肥皂客户端.由于我们使用了来自服务的 3 种不同操作,我想在 Mule 肥皂组件中的客户端属性"下动态填充操作"字段.我现在的工作方式是:
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
这可能吗?使用 Mule CE 3.3.1.提前致谢.
Is that possible? Using Mule CE 3.3.1. Thanks in advance.
推荐答案
为了实现您的目标:
- 从
cxf:jaxws-client
元素中移除operation
属性, 在
cxf:jaxws-client
元素之前添加将操作设置为出站消息属性:
- Remove the
operation
attribute from thecxf:jaxws-client
element, Add set the operation as an outbound message property before the
cxf:jaxws-client
element with:
<set-property propertyName="operation" value="#[...]" />
其中 #[...]
表示从消息中提取操作名称的 MEL 表达式.
where #[...]
represents a MEL expression that extracts the operation name from the message.
这篇关于mule动态设置soap操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!