Mule - 'map' 运算符的类型不匹配

Mule - Type mismatch for 'map' operator

要求是在 mule 中引入 CXF 服务。 据我所知,我尝试在 mule 中创建配置,但出现如下所示的错误。

Exception while executing: 
        (payload.ns0#ValidateVIN.*ns0#VIN map ((vIN , indexOfVIN) -> {
         ^
Type mismatch for 'map' operator
     found :null, :function
  required :array, :function.

附上下面的代码。

<?xml version="1.0" encoding="UTF-8"?>
<mule ... >
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="9009" basePath="Mule" doc:name="HTTP Listener Configuration"/>
    <cxf:configuration name="Autoprefill_CXF_Configuration" enableMuleSoapHeaders="true" initializeStaticBusInstance="true" doc:name="CXF Configuration"/>
    <flow name="autoprefillFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/VINService" allowedMethods="POST" doc:name="HTTP"/>
        <logger message="#[message.payloadAs(String)]" level="INFO" doc:name="Logger"/>
        <dw:transform-message doc:name="Transform Message" metadata:id="566ab616-f256-4763-af42-82d4cbbcc277">
            <dw:input-payload mimeType="application/xml"/>
            <dw:set-payload><![CDATA[%dw 1.0
            %output application/xml
            %namespace ns0 http://www.pwc.com/vin
            ---
            {
                ns0#ValidateVIN: {
                    (payload.ns0#ValidateVIN.*ns0#VIN map ((vIN , indexOfVIN) -> {
                        ns0#VIN: vIN
                    }))
                }
            }]]></dw:set-payload>
        </dw:transform-message>
        <cxf:simple-client operation="validateVIN" serviceClass="autoprefill.VINPort" doc:name="CXF"/>
        <logger message="#[message.payloadAs(String)]" level="INFO" doc:name="Logger"/>
    </flow>
</mule>

我尝试删除消息转换 属性,但那次我收到以下错误

java.lang.String cannot be cast to java.util.Collection. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor

该服务需要一个字符串列表。我不确定如何在 mule 中完成。任何帮助将不胜感激。

问题出在 Transform Message 组件中。

地图函数需要一个数据数组(数据集合),但它没有收到任何值。

我建议在 Transform Message 组件之前检查负载。可能负载不是预期的格式。如果你能在这里分享有效负载(或至少完整的日志),我可以帮助你进行转换。