title: Making call to Rest services in mule ESB
body: <p>I have made a web app which call mule server which is listening to http inbound point  at 8081 for accessing the database.I am accessing the database successfully and getting a message. But I want to access the other rest services after I get the object from the database and run some operations.
  I don't know how to achieve this.</p>
  
  <p>Please give me example. I am posting my flow.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 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" version="EE-3.5.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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.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/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
  http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
  http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd"&gt;
      &lt;http:endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" name="HTTP" doc:name="HTTP"/&gt;
      &lt;db:mysql-config name="MySQL_Configuration" host="localhost" port="3306" user="root" password="123456" database="Customer" doc:name="MySQL Configuration"/&gt;
      &lt;flow name="muleesbintegrationFlow1" doc:name="muleesbintegrationFlow1"&gt;
          &lt;http:inbound-endpoint exchange-pattern="request-response"   path="crud" doc:name="HTTP" ref="HTTP"/&gt;
          &lt;set-session-variable variableName="input" value="#[message.inboundProperties.'http.query.params'.input]" doc:name="input"/&gt;
          &lt;set-session-variable variableName="cid" value="#[message.inboundProperties.'http.query.params'.cid]" doc:name="cid"/&gt;
          &lt;set-session-variable variableName="fname" value="#[message.inboundProperties.'http.query.params'.fname]" doc:name="fname"/&gt;
          &lt;set-session-variable variableName="lname" value="#[message.inboundProperties.'http.query.params'.fname]" doc:name="lname"/&gt;
          &lt;choice doc:name="ChoicerOfCrud"&gt;
              &lt;when expression="#[sessionVars['input']== &amp;quot;insert&amp;quot;]"&gt;
                  &lt;db:insert config-ref="MySQL_Configuration" doc:name="insert"&gt;
                      &lt;db:parameterized-query&gt;&lt;![CDATA[INSERT INTO `Customer`.`customer` (`customer_id`, `fname`, `lname`) VALUES (#[sessionVars['cid']], #[sessionVars['fname']],  #[sessionVars['lname']]);]]&gt;&lt;/db:parameterized-query&gt;
                  &lt;/db:insert&gt;
              &lt;/when&gt;
              &lt;when expression="#[sessionVars['input']]==&amp;quot;update&amp;quot;]"&gt;
                  &lt;db:update config-ref="MySQL_Configuration" doc:name="update"&gt;
                      &lt;db:parameterized-query&gt;&lt;![CDATA[UPDATE `Customer`.`customer`  set 
  fname =  #[sessionVars['fname']],
  lname=  #[sessionVars['lname']]
  where customer_id = #[sessionVars['cid']];]]&gt;&lt;/db:parameterized-query&gt;
                  &lt;/db:update&gt;
              &lt;/when&gt;
              &lt;when expression="#[sessionVars['input']==&amp;quot;select&amp;quot;]"&gt;
                  &lt;db:select config-ref="MySQL_Configuration" doc:name="selected"&gt;
                      &lt;db:parameterized-query&gt;&lt;![CDATA[SELECT * FROM Customer.customer where customer_id =#[sessionVars['cid']];]]&gt;&lt;/db:parameterized-query&gt;
                  &lt;/db:select&gt;
              &lt;/when&gt;
              &lt;otherwise&gt;
                  &lt;db:delete config-ref="MySQL_Configuration" doc:name="delete"&gt;
                      &lt;db:dynamic-query&gt;&lt;![CDATA[DELETE FROM `Customer`.`customer` WHERE `customer_id`=#[sessionVars['cid']];]]&gt;&lt;/db:dynamic-query&gt;
                  &lt;/db:delete&gt;
              &lt;/otherwise&gt;
          &lt;/choice&gt;
      &lt;/flow&gt;
  &lt;/mule&gt;
  </code></pre>