如何将来自 webservice 调用的消息映射到 mule 中的数据库?

how to map the message from webservice call to the database in mule?

我正在使用 mule 公开一个网络服务供销售人员调用。我的问题是如何将元素从 wsdl 映射到我的目标 mysql 数据库? 例如:在 wsdl 文件中,我有这些:

<xsd:element name="createAccount">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="accountName" type="xsd:string" nillable="false"/>
<xsd:element name="accountType" type="xsd:string" nillable="true"/>
<xsd:element name="industry" type="xsd:string" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

然后我想用一个DataMapper把这三个元素映射到MySQLtable中的三个字段。我的问题是: 1. 在 DataMappper 中,如果我选择 XML 作为输入,它会询问我没有的模式文件。那么如何在 DataMapper 中进行配置呢?

  1. 数据库连接要写什么?假设我的 sql 服务器 table 中的字段名称是名称、类型和行业。如何编写插入语句?

谢谢。

活泼

  1. 您确实有架构,因为您已将其中的一部分粘贴到问题中。找到 here Datamapper 和 SOAP 的示例。
  2. 如果您使用新的数据库连接器而不是旧的 jdbc,Datamapper 将知道要映射到哪里,请参阅:https://www.youtube.com/watch?v=5fmFescqdao