문제

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