Handling Binary Data in Silk Performer

I have run into issues while performance testing Flex Applications where sometimes the AMF responses come back in binary format instead of more readable XML format.  Actually in one case the binary data was even base64 encoded and presented by silk performer ( in this case just disable the  option to transform the flex responses to xml format in your active profile). 

As always you need to parse responses to extract useful information which you can then use in subsequent calls. The problem is the binary data contains nulls and all kinds of  non ascii characters.  How do you deal with those. The following simple  function will replace all the null and non printable characters to printable ascii string.  You need to pass in the source binary string and the character you want as a replacement for non printable characters . Call could be like this:  binToAscii ( src, “+”); . Now you have a simple ascii string and you can extract whatever strings you want to extract ( object_ids, guids etc..).

function binToAscii( src : string ; printChar :string )
      len : number;
      tmp : string;
     len := binlen(src);
     for  i:=1 to len do
         if ( bin(tmp) = "h00" ) then
         elseif  (ord(tmp[1]) < 32 ) or (( ord(tmp[1]) >= 127) and ( ord(tmp[1]) <= 144)) or (( ord(tmp[1]) >= 147) and ( ord(tmp[1]) <= 159))then
  end binToAscii;


Tags: , , , , , , , , , , ,

6 Responses to “Handling Binary Data in Silk Performer”

  1. ashwin Says:

    Could you tell me how to capture the response and pass it to this function? I could find only the functions related to capture HTML response but none to capture the binary response.

    Any help in this regard would be appreciable.

  2. Kylee Corna Says:

    Very interesting, have you done any more work on this?

  3. Shelba Frizell Says:

    ctoajhpephdsfbujwf, Canada over counter propecia, FBWAmJP.

  4. Spring Fenniman Says:

    I have done
    M.Phil (Education) from Vietnam
    M A English(TEFL) from Australia
    I have 6 year teaching experience mainly laguage from O Level to MBA
    This experience includes teaching of IELTS, TOEFL, SAT, GMAT, GMAT &
    Business English.
    My DOB is o1 Sep.1979. I am definitely looking for a job of a English Teacher, as I feel more comfortable with students.
    AI LE

  5. Lorene Says:

    I read a lot of interesting content here. Probably you
    spend a lot of time writing, i know how to save you a lot of time,
    there is an online tool that creates unique, SEO friendly articles in seconds, just search in google – laranitas free content source

  6. facebook fans Says:

    ramsen simmonds incesticide bushell sprinkler brasserie Donelle Dalila gazzara

Leave a Reply