title: Mule: How to use until successfull processor for service calls
body: <p>Please help me on this logic. I have to call the service and get the response back.If the service is down or something have to retry 3 times  and once exhausted need to log in DLQ.I'm using <strong>until successful</strong> processor.For success scenario i'm getting only <strong>null payload</strong> in logger.But i tried keeping the HTTP outbound end point without until successfull able to get the response from the service. Please find my xml config. </p>
  
  <pre><code>              &lt;flow name="Flow" doc:name="eFlow" tracking:enable-default-events="true"&gt;
                       &lt;wmq:inbound-endpoint queue="InputQ" tracking:enable-default-events="true" connector ref="WMQ_Connector" doc:name="connector"&gt;
                   &lt;wmq:transaction action="NONE"/&gt;
                &lt;/wmq:inbound-endpoint&gt;
                    &lt;mulexml:dom-to-xml-transformer&gt;&lt;/mulexml:dom-to-xml-transformer&gt;
                       &lt;set-session-variable variableName="originalPayload" value="#[payload]"       doc:name="Store_Payload"/&gt;
                  &lt;choice tracking:enable-default-events="true" doc:name="Choice"&gt;
                &lt;when expression="#[xpath('fn:local-name(/root/*[2])') == 'Master']"&gt;
                           &lt;data-mapper:transform config-ref="Master_grf" doc:name="Master"/&gt;
                      &lt;/when&gt;
               &lt;when expression="#[xpath('fn:local-name(/root/*[2])') == 'Request']"&gt;
          &lt;data-mapper:transform config-ref="Request_grf" doc:name="Bulk"/&gt;
               &lt;/when&gt;
                      &lt;otherwise&gt;
              &lt;scripting:component doc:name="Throw_Exception"&gt;
                &lt;scripting:script engine="Groovy"&gt;&lt;![CDATA[throw new IllegalArgumentException  ('requests invalid') ]]&gt;
             &lt;/otherwise&gt;
                      &lt;/choice&gt;
                 &lt;mulexml:dom-to-xml-transformer&gt;&lt;/mulexml:dom-to-xml-transformer&gt;
                 &lt;flow-ref name="Invoke_Service" doc:name="Flow Reference"/&gt;
                &lt;/flow&gt;
  
  
                  &lt;flow name="Invoke_Service" doc:name="Invoke_Service" tracking:enable-default-events="true"&gt;
       &lt;cxf:jaxws-client  enableMuleSoapHeaders="true" doc:name="SOAP" operation="Request" serviceClass="com.valid.ICase"/&gt;
         &lt;until-successful objectStore-ref="objectStore" maxRetries="3" secondsBetweenRetries="2"  deadLetterQueue-ref="VM" doc:name="UntilSuccessful_SymboticService"&gt;
         &lt;http:outbound-endpoint exchange-pattern="request-response"    method="POST" doc:name="HTTP" address="http://localhost:1112/symbotic"/&gt;
            &lt;/until-successful&gt;  
         &lt;byte-array-to-string-transformer doc:name="Byte Array to String"/&gt;
      &lt;logger message="**********success***Payload: #[payload]*****" level="INFO" doc:name="Logger"/&gt;
  </code></pre>
  
  <p>But incase of failure scenario until success retry 3 times ( works fine). I have tried request reply processor inside until also transactional processor. It is not working. Using Mule version 3.4.kindly suggest me.</p>
  
  <p>Retried the same  with request -reply processor as per the suggestion</p>
  
  <pre><code>      &lt;flow name="Flow" doc:name="eFlow" tracking:enable-default-events="true"&gt;
               &lt;wmq:inbound-endpoint queue="InputQ" tracking:enable-default-events="true" connector-           ref="WMQ_Connector" doc:name="connector"&gt;
      &lt;wmq:transaction action="NONE"/&gt;
      &lt;/wmq:inbound-endpoint&gt;
             &lt;mulexml:dom-to-xml-transformer&gt;&lt;/mulexml:dom-to-xml-transformer&gt;
          &lt;set-session-variable variableName="originalPayload" value="#[payload]" doc:name="Store_Payload"/&gt;
           &lt;choice tracking:enable-default-events="true" doc:name="Choice"&gt;
      &lt;when expression="#[xpath('fn:local-name(/root/*[2])') == 'Master']"&gt;
          &lt;data-mapper:transform config-ref="Master_grf" doc:name="Master"/&gt;
      &lt;/when&gt;
      &lt;when expression="#[xpath('fn:local-name(/root/*[2])') == 'Request']"&gt;
          &lt;data-mapper:transform config-ref="Request_grf" doc:name="Bulk"/&gt;
      &lt;/when&gt;
   &lt;otherwise&gt;
          &lt;scripting:component doc:name="Throw_Exception"&gt;
              &lt;scripting:script engine="Groovy"&gt;&lt;![CDATA[throw new IllegalArgumentException('requests           other then Master andRequest') ]]&gt;
      &lt;/otherwise&gt;
   &lt;/choice&gt;
    &lt;mulexml:dom-to-xml-transformer&gt;&lt;/mulexml:dom-to-xml-transformer&gt;
    &lt;request-reply timeout="10000"&gt;
   &lt;vm:outbound-endpoint path="request"/&gt;      
      &lt;vm:inbound-endpoint path="reply"/&gt;
     &lt;/request-reply&gt; 
    &lt;byte-array-to-string-transformer doc:name="Byte Array to String"/&gt;
  &lt;logger message="**********success***Payload: #[payload]*****" level="INFO" doc:name="Logger"/&gt;     
    &lt;/flow&gt;
  
    &lt;flow name="Invoke_Service" doc:name="Invoke_Service" tracking:enable-default-events="true"&gt;
  &lt;vm:inbound-endpoint path="request" doc:name="VM"/&gt;
   &lt;cxf:jaxws-client  enableMuleSoapHeaders="true" doc:name="SOAP" operation="Request"    serviceClass="com.valid.ICase"/&gt;
     &lt;until-successful objectStore-ref="objectStore" maxRetries="3" secondsBetweenRetries="2"  deadLetterQueue-ref="VM" doc:name="UntilSuccessful_Service"&gt;
     &lt;http:outbound-endpoint exchange-pattern="request-response"    method="POST" doc:name="HTTP" address="http://localhost:1112/symbotic"/&gt;
     &lt;/until-successful&gt; 
     &lt;/flow&gt;
  </code></pre>
  
  <p>Even then getting the <strong>null payload</strong>. Kindly suggest is this is the way your were directing me. Please correct me if im wrong.</p>