質問

I am new to mule ... I have an xml as payload :-

<com.test.services.schema.maindata.v1.DataRequest>
  <id>21</id>
  <name>a </name>
  <age>23</age>
  <designation>gfgf</designation>
</com.test.services.schema.maindata.v1.DataRequest>

Now I want to extract each value and insert into database ... How can I split each values ?? Do I need to use a splitter ?

役に立ちましたか?

解決

I assume that you do not want to deserialize this XML entity to an object.

The best is then to use xpath MEL XPath expressions in your JDBC outbound endpoint query.

MEL Xpath documentation: http://www.mulesoft.org/documentation/display/current/Mule+Expression+Language+Reference#MuleExpressionLanguageReference-XpathandRegex

JDBC outbound endpoint documentation showing old-style expressions in the query: http://www.mulesoft.org/documentation/display/current/JDBC+Transport+Reference#JDBCTransportReference-BasicInsert/Update/DeleteStatements

Just use MEL instead of the old style the MuleSoft doc shows.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top