title: How to Know the URL of Client In wso2 esb for Filter
body: <p>i am doing filter based on the URL so i wish to know the FROM which service i am getting request .Means  i wish to know the URL of Client</p>
  
  <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="Emp" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"&gt;
     &lt;target&gt;
        &lt;inSequence&gt;         
    &lt;property name="username" expression="//username/text()" scope="default" type="STRING"/&gt;
     &lt;property name="password" expression="//password/text()" scope="default" type="STRING"/&gt;         
           &lt;payloadFactory&gt;            
              &lt;format&gt;               
                 &lt;send xmlns=""&gt;                  
                    &lt;username&gt;$1&lt;/username&gt;                  
                    &lt;password&gt;$2&lt;/password&gt;               
                 &lt;/send&gt;            
              &lt;/format&gt;            
              &lt;args&gt;               
                 &lt;arg expression="get-property('username')"/&gt;               
                 &lt;arg expression="get-property('password')"/&gt;            
              &lt;/args&gt;         
           &lt;/payloadFactory&gt;         
           &lt;send receive="Emp_Seq"&gt;            
              &lt;endpoint&gt; 
  &lt;address uri="http://192.168.1.65:8282/services/Login"/&gt;
  &lt;/endpoint&gt;        
           &lt;/send&gt;      
        &lt;/inSequence&gt;
        &lt;outSequence/&gt;
     &lt;/target&gt;
     &lt;description&gt;&lt;/description&gt;
  &lt;/proxy&gt;
  
  
  URL of above Proxy is http://192.168.1.65:8282/services/Emp
  </code></pre>
  
  <p>my second proxy is which will do some logic based on first proxy</p>
  
  <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="Login" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"&gt;
     &lt;target&gt;
        &lt;inSequence&gt;
           &lt;property name="client_ip_address" expression="get-property('axis2','REMOTE_ADDR')" scope="default" type="STRING"/&gt;
           &lt;property name="username" expression="//username/text()" scope="default" type="STRING"/&gt;
           &lt;property name="password" expression="//password/text()" scope="default" type="STRING"/&gt;
          &lt;property name="From" expression="get-property('From')"/&gt;
  &lt;property name="Address" expression="get-property('To')"/&gt;
   &lt;filter xmlns:ns="http://org.apache.synapse/xsd" xpath="get-property('From')='/services/Emp'"&gt;
        &lt;then&gt;
           &lt;payloadFactory&gt;
              &lt;format&gt;
                 &lt;ResponseJSON xmlns=""&gt;
                    &lt;Status&gt;404&lt;/Status&gt;
                    &lt;Exception&gt;Not Found&lt;/Exception&gt;
                    &lt;Total&gt;0&lt;/Total&gt;
                 &lt;/ResponseJSON&gt;
              &lt;/format&gt;
           &lt;/payloadFactory&gt;
           &lt;send/&gt;
        &lt;/then&gt;
        &lt;else&gt;
          &lt;payloadFactory&gt;
              &lt;format&gt;
                 &lt;p:login xmlns:p="http://authentication.services.core.carbon.wso2.org"&gt;
                    &lt;p:username&gt;$1&lt;/p:username&gt;
                    &lt;p:password&gt;$2&lt;/p:password&gt;
                    &lt;p:remoteAddress&gt;$3&lt;/p:remoteAddress&gt;
                 &lt;/p:login&gt;
              &lt;/format&gt;
              &lt;args&gt;
                 &lt;arg expression="//username/text()"/&gt;
                 &lt;arg expression="//password/text()"/&gt;
                 &lt;arg expression="get-property('client_ip_address')"/&gt;
              &lt;/args&gt;
           &lt;/payloadFactory&gt;
           &lt;header name="Action" value="urn:login"/&gt;
           &lt;log level="full"/&gt;
           &lt;send receive="Login_Seq"&gt;
              &lt;endpoint&gt;
                 &lt;address uri="https://192.168.1.65:9443/services/AuthenticationAdmin" format="soap11"/&gt;
              &lt;/endpoint&gt;
           &lt;/send&gt;
     &lt;/filter&gt;
  
  
        &lt;/inSequence&gt;
        &lt;outSequence&gt;
           &lt;log level="full"/&gt;
                &lt;/outSequence&gt;
     &lt;/target&gt;
     &lt;description&gt;&lt;/description&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>The issue is get-property('To') is giving  Address=/services/Login  where as get-property('From') is giving   senderAddress=null
  How can i manage this i trie d with lot of propertys even though its not working<br>
  like </p>
  
  <pre><code>&lt;property name="senderAddress" expression="get-property('transport', 'From')"/&gt;
  &lt;property name="Sender Address" expression="$url:From"/&gt;
  &lt;header name="From" expression="get-property( 'From')"/&gt;
  &lt;property name="PRESERVE_WS_ADDRESSING" value="true"/&gt;
              &lt;property xmlns:wsa="http://www.w3.org/2005/08/addressing" name="$header" expression="$header/wsa:From"/&gt;
  </code></pre>
  
  <p>This propertys also not working we don't have any option in wso2 esb  If you know this please edit my proxy roughly ..its simple depanding logic but it is not working in WSO2
  thanks in advance</p>