Forum Discussion

War1ock_259955's avatar
War1ock_259955
Icon for Nimbostratus rankNimbostratus
May 05, 2016

iRule created to remap a SOAP action

Hi all,

 

I am wondering if this is iRule that we have created is missing something? Please can someone cast and eye and tell me where we are going wrong if at all?

 

when HTTP_REQUEST { if {[HTTP::header "SOAPAction"] contains ""}{

 

This will replace the header details

 

HTTP::header replace "SOAPAction" [""]

 

This will replace the body detail STREAM::expression {@body/Query/2.0@body/Query/3.0@}

 

Enable the stream filter for this response only STREAM::enable

 

} } when HTTP_RESPONSE { This will replace the body detail STREAM::expression {@body/Query/3.0@body/Query/2.0@}

 

Enable the stream filter for this response only STREAM::enable }

 

We are trying to redirect a v2 soap query to a new system that is running v3 and returning v2 to the client. Is there a better way to do this?

 

1 Reply

  • Sorry all just had to fix the look of the iRule it looked a bit odd.

    when HTTP_REQUEST {
    if {[HTTP::header "SOAPAction"] contains "http://xxx/webservice1"}{ 
    
     This will replace the header details      
    HTTP::header replace "SOAPAction" ["http://xxx/webservice2"]
    
    This will replace the body detail
    STREAM::expression {@body/Query/2.0@body/Query/3.0@}
    
     Enable the stream filter for this response only
    STREAM::enable   
    }
    }
    when HTTP_RESPONSE {
    STREAM::expression {@body/Query/3.0@body/Query/2.0@}
    STREAM::enable
    }