如何在 webservice class mule 中获取 payload

How get payload inside webservice class mule

我需要 ShipmentProcessImpl class 或 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 class 对象,但我无法使用 mulecontext 对象获取有效负载。

可以通过任何其他方式在 web 服务中获取负载 class。

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

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

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