Forum Discussion

smorri1967_1351's avatar
smorri1967_1351
Icon for Nimbostratus rankNimbostratus
Aug 01, 2014

Does SideBand handle sending Soap with MTOM attachments?

I have a usecase to use Sideband to intercept SOAP over HTTP requests sent to our F5 device and replicate those messages off to a testing environment that needs to get the same steady stream of data for regression testing. My design is using an iRule added to the Virtual Server that uses Sideband to open a connection to a new Virtual Server that controls what Server Pool to route the requests to based on the http::uri. I have Sideband working great except for one request that is different because it is sending SOAP with an MTOM attachment. I am monitoring the backend traffic and the requests look good at a cursory level but it's hard to verify since it's binary. The first step in my backend app is to validate the SOAP request against an XSD schema to ensure everything is correct. The requests without MTOM work just fine but the ones with MTOM attachments fail stating the attachment isn't GZIP. I have altered my configs to point Sideband at multiple servers to ensure that the backend servers are configured just like the primary feed servers and they are all correct. So I have narrowed it down to the Sideband logic must be corruption the attachment when I create the $Data for the connection.

Here is the snippet from my iRule where the connections are made and sent (minus all my logging statements):

 Connect to an external host with a connection timeout of 1000ms and an idle timeout of 30 seconds
    set Iconn [connect -timeout 1000 -idle 30 -status Iconn_status $Isb_vserver]
    set Iconn_info [connect info -idle -status $Iconn]
    set Irequest [HTTP::request]                
    set Idata "$Irequest[HTTP::payload]\r\n\r\n"
    set Isend_info [send -timeout 3000 -status Isend_status $Iconn $Idata]
    close $Iconn

I am guessing that the HTTP::payload variable doesn't include the MTOM attachments or corrupts them somehow but I can't find any evidence to support my theory. My backend server contains binary data that looks like it could be the attachment and the headers show the appropriate types for a binary payload.

Any help is greatly appreciated. Steve

1 Reply

  • R_Eastman_13667's avatar
    R_Eastman_13667
    Historic F5 Account

    Try this:

    `set Idata "${Irequest}\r\nAccept-Encoding: gzip,deflate\r\nContent-Type: multipart/related; type=text/xml;\r\n\r\n[HTTP::payload]"`