title: How can I retrieve HTTP status returned by REST service in WSO2 ESB?
body: <p>My Proxy Service deployed on ESB is calling another standalone REST service. This service returns HTTP status 200 along with some data in the response body. My question is how I can retrieve HTTP status from response. Here is my configuration:</p>
  
  <pre><code>   &lt;proxy name="CQProxy"
            transports="https http"
            startOnLoad="true"
            trace="disable"&gt;
        &lt;description/&gt;
        &lt;target&gt;
           &lt;inSequence&gt;
              &lt;switch source="get-property('Action')"&gt;
                 &lt;case regex="getTaskTicket"&gt;
                    &lt;sequence key="GetTaskTicket"/&gt;
                 &lt;/case&gt;
                 &lt;default/&gt;
              &lt;/switch&gt;
           &lt;/inSequence&gt;
           &lt;outSequence&gt;
              &lt;log&gt;
                 &lt;property xmlns:ns="http://org.apache.synapse/xsd"
                           name="Status"
                           expression="get-property('HTTP_SC')"/&gt;
              &lt;/log&gt;
              &lt;send/&gt;
           &lt;/outSequence&gt;
           &lt;faultSequence/&gt;
        &lt;/target&gt;
        &lt;publishWSDL key="gov:/services/cqproxy/CQProxy.wsdl"&gt;
           &lt;resource location="CQProxy.xsd" key="gov:/services/cqproxy/CQProxy.xsd"/&gt;
        &lt;/publishWSDL&gt;
     &lt;/proxy&gt;
     &lt;sequence name="GetTaskTicket"&gt;
  ...
        &lt;property name="REST_URL_POSTFIX"
                  value="/16783484?oslc.select=dcterms:title,oslc_cm:status"
                  scope="axis2"
                  type="STRING"/&gt;
        &lt;property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/&gt;
        &lt;send&gt;
           &lt;endpoint&gt;
              &lt;address uri="http://.../simpleQuery"
                       format="rest"/&gt;
              &lt;property name="OSLC-Core-Version" value="2.0" scope="transport"/&gt;
              &lt;property name="Accept" value="application/rdf+xml" scope="transport"/&gt;
           &lt;/endpoint&gt;
        &lt;/send&gt;
     &lt;/sequence&gt;
  ...
  </code></pre>
  
  <p>I tried the following code:</p>
  
  <pre><code>&lt;log&gt;
  &lt;property xmlns:ns="http://org.apache.synapse/xsd" name="Status" expression="get-property('HTTP_SC')"/&gt;
  &lt;/log&gt;
  </code></pre>
  
  <p>And this one too:</p>
  
  <pre><code>&lt;log&gt;
  &lt;property xmlns:ns="http://org.apache.synapse/xsd" name="Status" expression="get-property('axis2', 'HTTP_SC')"/&gt;
  &lt;/log&gt;
  </code></pre>
  
  <p>But all of them returned null.</p>