Question

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 ?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top