【问题标题】:how to map the message from webservice call to the database in mule?如何将来自 web 服务调用的消息映射到 mule 中的数据库?
【发布时间】:2015-01-14 04:46:57
【问题描述】:

我正在使用 mule 公开 Web 服务以供销售人员调用。我的问题是如何将元素从 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将这三个元素映射到MySQL表中的三个字段。我的问题是: 1. 在 DataMappper 中,如果我选择 XML 作为输入,它会询问我没有的架构文件。那么如何在 DataMapper 中配置呢?

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

谢谢。

活

【问题讨论】:

    标签: mule


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

    【讨论】:

    • 感谢 Victor,但第一个示例似乎不可用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-09
    相关资源
    最近更新 更多