Mulesoft Anypoint Studio Issue with DataMapper - Unable to identify/sense the input source

I am facing a problem with datamapper functionality. I have created a flow where I am querying the database and want the output to be passed to datamapper for converting it to a good readable format say xml. The problem is that when I insert a datamapper after the database connector, it does not sense the input correctly. Also I am not able to select the actual Source and type for input/output.

Mulesoft Anypoint Studio Issue with DataMapper - Unable to identify/sense the input source

Below is my configuration XML:

<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="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 http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd"> <http:listener-config name="HTTP_Listener_Configuration-2" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="localhost" port="3306" user="user" password="XXXXX" database="test" doc:name="MySQL Configuration"/> <flow name="sample2Flow"> <http:listener config-ref="HTTP_Listener_Configuration-2" path="/mysqlconnect" doc:name="HTTP"/> <set-payload value="'mysql connect'" doc:name="Set Payload"/> <db:select config-ref="MySQL_Configuration" doc:name="Database"> <db:parameterized-query><![CDATA[select * from employee where id=#[message.inboundProperties.'http.query.params'.id]]]></db:parameterized-query> </db:select> <data-mapper:transform doc:name="DataMapper"/> <logger message="#[payload]" level="INFO" doc:name="Logger"/> <echo-component doc:name="Echo"/> </flow> </mule>

Category:datamapper Views:0 Time:2018-12-06

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 4.617 (s). 12 q(s)