Generic Connector in Mule
Generic connector is used to configure any type of connector mentioned in list.
flow of generic connector :
Generic connector configuration :
we have used it as HTTP connector with the address : http://localhost:8085/api/generic
if you want to choose some other connector then go to connector configuration by clicking + button and choose from the list.
When you hit the mentioned url you will get the output set in set payload component.
XML project code :
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" 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"
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">
<flow name="test_genericFlow">
<inbound-endpoint exchange-pattern="request-response" address="http://localhost:8085/api/generic" doc:name="Generic"/>
<set-payload value="Hello Himanshu" doc:name="Set Payload"/>
</flow>
</mule>
No comments:
Post a Comment