title: PayloadFactory - Enrich with Response
body: <p>I make a callout that response is like this:  </p>
  
  <pre><code>&lt;ns:return&gt;
      &lt;ax2446:contract&gt;
          &lt;ax2446:array&gt;variable1&lt;/ax2446:array&gt;
          &lt;ax2446:array&gt;value1&lt;/ax2446:array&gt;
      &lt;/ax2446:contract&gt;
      &lt;ax2446:contract&gt;
          &lt;ax2446:array&gt;variable2&lt;/ax2446:array&gt;
          &lt;ax2446:array&gt;value2&lt;/ax2446:array&gt;
      &lt;/ax2446:contract&gt;
      &lt;ax2446:contract&gt;
          &lt;ax2446:array&gt;variable3&lt;/ax2446:array&gt;
          &lt;ax2446:array&gt;value3&lt;/ax2446:array&gt;
      &lt;/ax2446:contract&gt;
      &lt;ax2446:documents&gt;
          &lt;ax2446:array&gt;attachement1&lt;/ax2446:array&gt;
          &lt;ax2446:array&gt;D:\AUTO\filename-1.txt&lt;/ax2446:array&gt;
      &lt;/ax2446:documents&gt;
      &lt;ax2446:documents&gt;
          &lt;ax2446:array&gt;attachment2&lt;/ax2446:array&gt;
          &lt;ax2446:array&gt;D:\AUTO\filename-2.txt&lt;/ax2446:array&gt;
      &lt;/ax2446:documents&gt;
      &lt;ax2446:process&gt;TEST_PROCESS&lt;/ax2446:modulo&gt;
  &lt;/ns:return&gt;
  </code></pre>
  
  <p>i want to create a new payload with contracts values (the number can change)</p>
  
  <pre><code>   &lt;p:instantiateProcess xmlns:p="http://carbon.sample"&gt;
        &lt;xs:process xmlns:xs="http://carbon.sample"&gt;TEST_PROCESS&lt;/xs:process&gt;
        &lt;ns:contract xmlns:ns="http://carbon.sample"&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;variable1&lt;/xs:array&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;value1&lt;/xs:array&gt;
        &lt;/ns:contract&gt;
        &lt;ns:contract xmlns:ns="http://carbon.sample"&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;variable2&lt;/xs:array&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;value2&lt;/xs:array&gt;
        &lt;/ns:contract&gt;
        &lt;ns:contract xmlns:ns="http://carbon.sample"&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;variable3&lt;/xs:array&gt;
           &lt;xs:array xmlns:xs="http://carbon.sample"&gt;value3&lt;/xs:array&gt;
        &lt;/ns:contract&gt;
     &lt;/p:instantiateProcess&gt;´
  </code></pre>
  
  <p>i get all the contract by:</p>
  
  <pre><code>&lt;property
          expression="//ns:return/ax2431:contract"
          name="contract" scope="default" type="STRING"
          xmlns:ax2431="http://vo.carbon.sample/xsd" xmlns:ns="http://carbon.sample"/&gt;
  </code></pre>
  
  <p>I try with payloadfactory, by i dont know how to enrinch (if it is correct to use this mediator) the message to make a call to a new web service. or if i have to make the payload with an iterator... </p>
  
  <p>can anybody help me? thanks</p>