Insertinto database with xpath query and multiple xpath expressions -
i new xpath , i'm trying use multiple expressions "|" separator, when have configuration xml set to:
<?xml version="1.0" encoding="utf-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" version="ee-3.4.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"> <jdbc-ee:mssql-data-source name="ms_sql_data_source" user="username" password="passcode" url="jdbc:sqlserver://domain\sqlexpress:65183;databasename=muletest" transactionisolation="unspecified" doc:name="ms sql data source"/> <jdbc-ee:connector name="database" datasource-ref="ms_sql_data_source" validateconnections="true" querytimeout="-1" pollingfrequency="0" doc:name="database"> <jdbc-ee:query key="insertrecord" value="insert databaseupdate(buyerordernumber, orderissuedate) values (#[xpath('//buyerordernumber').text], #[xpath('//orderissuedate').text])"/> </jdbc-ee:connector> <flow name="write_xml_file_to_databaseflow1" doc:name="write_xml_file_to_databaseflow1"> <file:inbound-endpoint path="c:\mule" responsetimeout="10000" doc:name="file"/> <byte-array-to-string-transformer doc:name="byte array string"/> <splitter evaluator="xpath" expression="/order/orderheader/ordernumber|/order/orderheader" doc:name="splitter"/> <jdbc-ee:outbound-endpoint exchange-pattern="one-way" querykey="insertrecord" querytimeout="-1" connector-ref="database" doc:name="destination"/> </flow> </mule>
i nullpointerexception. confusion lies in xpath queries, how hardcode multiple expression paths, , associate xpath query using insert? thanks.
Comments
Post a Comment