Mule ESB:XML到映射转换失败

Mule ESB:XML到映射转换失败,mule,Mule,我想阅读JMS主题中的消息&使用Mule JDBC数据库适配器存储在表中,我知道我必须将JMS XML消息转换为映射负载,以便轻松地将其放入JDBC中。以下是示例流程: <flow name="DBLoggerFlow"> <jms:inbound-endpoint topic="${topic.logTopic}" connector-ref="jmsConnector" doc:name="JMS"> <jms:transactio

我想阅读JMS主题中的消息&使用Mule JDBC数据库适配器存储在表中,我知道我必须将JMS XML消息转换为映射负载,以便轻松地将其放入JDBC中。以下是示例流程:

<flow name="DBLoggerFlow">
  <jms:inbound-endpoint topic="${topic.logTopic}"
         connector-ref="jmsConnector" doc:name="JMS">
    <jms:transaction action="NONE" timeout="${queue.transaction.timeout}" />
  </jms:inbound-endpoint>
  <jdbc:xml-to-maps-transformer name="XMLToMaps"/>
  <jdbc:outbound-endpoint queryKey="insertion"
           connector-ref="insertionConnector"/>
</flow>

但是,当我运行代码时,会出现以下错误:

ERROR 2013-02-01 13:00:26,427 [WrapperListener_start_runner] org.mule.module.launcher.application.DefaultMuleApplication: null org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jdbc:xml-to-maps-transformer'. One of ' is expected. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) 错误2013-02-01 13:00:26427[WrapperListener\u start\u runner]org.mule.module.launcher.application.DefaultMuleApplication:null org.xml.sax.SAXParseException:cvc复杂类型.2.4.a:发现以元素“jdbc:xml-to-maps-transformer”开头的无效内容。预计会有一个。 位于org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(未知源) 位于org.apache.xerces.util.ErrorHandlerWrapper.error(未知源) 位于org.apache.xerces.impl.XMLErrorReporter.reportError(未知源) 位于org.apache.xerces.impl.XMLErrorReporter.reportError(未知源) 位于org.apache.xerces.impl.XMLErrorReporter.reportError(未知源) 位于org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(未知源) 位于org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(未知源) 位于org.apache.xerces.impl.xs.XMLSchemaValidator.handlestarelement(未知源) 为什么XML到映射的转换在这里是一个问题?有没有其他更好的方法

为什么XML到映射的转换在这里是一个问题

xml-to-maps-transformer
仅适用于Mule Enterprise版本:您可能正在运行CE

有没有其他更好的方法

在JDBC语句中使用MEL
xpath()
表达式直接从XML负载中检索值并将其传递给DB


阅读MEL备忘单了解语法信息:

Hello David,为了进行概念验证,我正在尝试一个简单的用例,从主题中读取消息,并使用JDBC连接器将它们放入数据库。代码如下:注释不是共享配置的地方。接受我的答案,用配置打开一个新问题。