【问题标题】:How get payload inside webservice class mule如何在 webservice 类 mule 中获取有效负载
【发布时间】:2015-05-13 00:17:43
【问题描述】:

我需要 ShipmentProcessImpl 类或 MuleEventContext 对象中的有效负载值。

    <flow name="soaptest_rFlow1" doc:name="soaptest_rFlow1">
<http:inbound-endpoint exchange-pattern="request-response"
host="${host}" port="${port}" doc:name="HTTP" path="${deliveryUpdatePath}" />
<byte-array-to-string-transformer
doc:name="Byte Array to String" />
<logger category="ProTSP Listener Logger" level="INFO" message="#[payload]"
doc:name="Logger" />

<cxf:jaxws-service serviceClass="org.tempuri.ShipmentProcess"
doc:name="CXF" />
<component class="org.tempuri.ShipmentProcessImpl" doc:name="Java" />
</flow>

我可以使用 @Lookup 注释获取 MuleContext 类对象,但我无法使用 mulecontext 对象获取有效负载。

可以通过任何其他方式在 webservice 类中获取有效负载。

【问题讨论】:

    标签: soap mule esb


    【解决方案1】:

    MuleContext 是正在运行的 Mule 应用程序的活动上下文,它与流正在处理的当前 MuleEvent 无关。

    您需要通过对org.mule.RequestContext.getEventContext() 的静态调用来获取MuleEventContext

    是的,它已被弃用,但它仍然有效,坦率地说,我不知道服务类实现的替代方案...

    【讨论】:

    • 3.7 中仍然存在
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-18
    • 1970-01-01
    相关资源
    最近更新 更多