Re: XML correlation in Java over HTTP protocol (928 Views)
Reply
Occasional Advisor
rahul1988
Posts: 16
Registered: ‎09-23-2012
Message 1 of 8 (1,247 Views)

XML correlation in Java over HTTP protocol

Hello everyone,

I am working on a java application which i have recorded using Java over HTTP protocol. I recorded this application using web/http protocl earlier but the data was completely in Binary.

 

Using Java over HTTP and by updating all JAR files i managed to get the object in my script.

 

My question is that how do you correlate and parametrize the XML reuqests using lr2 field setter/getter as the example in the helpfile is not that useful.

 

Also when i run the script i get the error: 1 bytes still left which were not read!!  --(---this error does not fail the script)

 

If anyone has worked on this protocol or have any idea could give any suggestions/example it would be really helpful!!

 

Here is a snippet of the script:

//////////////////////    requestBody0.xml    //////////////////////
 TRexDataMap TRexDataMap0 = (TRexDataMap) JavaHTTP.readObject(TRexDataMapBA0);
       
 JavaHTTP.sendSerialized(TRexDataMap0, 0,
 "ZippedObjectsDeserializer",
 "TRexOneWeb",
 "URL=xxxxxxxxxxxxxxxx/TRexOneWeb/?Compressed=true&interface=com.techrx.model.service.tools.login.LoginService&method=login",
 new String[]{
  "Method=POST",
  "Resource=0",
  "RecContentType=application/octet-stream",
  "Referer=",
  "Mode=HTML",
  "EncType=application/octet-stream",
  LAST});// 0 is the number of the header file, couldn't decode response from body

 

Please use plain text.
Advisor
raulhu
Posts: 10
Registered: ‎08-10-2011
Message 2 of 8 (1,233 Views)

Re: XML correlation in Java over HTTP protocol

Hello,

 

Could you please share the server response data of the request where you would like to do a correlation?

 

Best Regards

Raul

Please use plain text.
Occasional Advisor
rahul1988
Posts: 16
Registered: ‎09-23-2012
Message 3 of 8 (1,222 Views)

Re: XML correlation in Java over HTTP protocol

Hi Raul,

   Thanks for your feedback. The issue is that all the data returned by the server is in Binary. Due to this the correlation values cannot be figured out from the data returned.

 

Snippet of data returned by server:

\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x00\xAD}[\x8C#gv^K#\xEDJZi\xA4\xD1\x8EfFs\xAD\xB9_\xC4
    f7\xFB6\x17\xADv\x97\xCD\xCB4\xB5l\x92C\xB2{F\xCAC\xBB\x86\xAC\xEE\xA6\x86\xCD\xE2\xB2\x8A
    \xD3\xDD\x1B8p\x92\x17g\x1D8\x89\xE38\xF6:\xD9\xD8\x06\x92 @\x02\x18\x88\xF3\xE0\x87\x04\xF0
    C\x00#\xC8S\x90\xBC\x1B\xC9c\x12\xF81~s\xCE\xF9\xEF\xB7*\x92\xBD;\x0Bm\x17\xC9\xBA\xFC\xF5
    \xFF\xE7?\xD7\xEF\x9C\xF3o\xFF\xEF\xDC\xDB\xD1h\xEEv'<\xC8\xC6Ag\x7Ft\x94\xF5\x87\xC3l<\n
    \x8E\xC2A\x90\x1D\xF7\xB2\xEDfpT\xF4c\x7F\xD3\x1F\xFE5\xFB\xF7\xFE\xDC\xDC\xD1\xF0\xF0\xD4
    \x1Bso\xC6s\xB7\x1Eg\x17\x17\xB3\x8BK\xD9\xB5\xA5G\xAB\xD9\xC5\xC7\xF3\x8B+\xF3K\x8B\xB9\xA5
    \xAC\xFA\xFD\xE1\x9Bx\xEA\xDB\xB9\xECZv\xF1\xF0\xEC\xDC\x1B\xE4\x7F\xF8\xEF\r~\x0CcXS\xC6p
    \x10v\x83~6\n

 

Is there any other possibloe solution to correlating the XMl requests?

 

Thanks,

Rahul

Please use plain text.
HP Expert
Suerte13cr
Posts: 736
Registered: ‎09-14-2011
Message 4 of 8 (1,204 Views)

Re: XML correlation in Java over HTTP protocol

What version of Vugen are you using? lr_get_xml_values is what would be used for retrieving XML values based on a query. Use the Function Reference (F1) in Vugen to check for an example on how to use it.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Advisor
raulhu
Posts: 10
Registered: ‎08-10-2011
Message 5 of 8 (1,187 Views)

Re: XML correlation in Java over HTTP protocol

Hi Rahul,

 

In 11.51 we have developed a new DFE chain which can transform the binary code to XML format data.

 

We can provide you one DLL if you would like to have try. Then you can replace the DLL and re-generate your script using the "Binary to Xml Extension" to transform binary code to Xml, then you could do correlation.

 

Please let me know if you need to replace the DLL file.

 

Best regards

Raul Hu

 

 

Please use plain text.
Occasional Contributor
franca
Posts: 6
Registered: ‎08-28-2008
Message 6 of 8 (971 Views)

Re: XML correlation in Java over HTTP protocol

Hi Rahul,

I have a similar issue. Did you find the solution to that?

Let us know how to fix please.

 

Regards,

manfriana

Please use plain text.
Regular Advisor
LoadRunner421
Posts: 79
Registered: ‎02-20-2013
Message 7 of 8 (964 Views)

Re: XML correlation in Java over HTTP protocol

Hello Raul Hu,

 

Can I have the DLL? I want to try to decode the binary that I'm seeing.

Please use plain text.
Occasional Visitor
ruppalapu
Posts: 1
Registered: ‎05-23-2013
Message 8 of 8 (928 Views)

Re: XML correlation in Java over HTTP protocol

Hi Rahul,

 

I have to test Smart client applications. Protocol advisor suggest to use JAVA over HTTP Protocol and Web (HTTP/HTML) protocol.

 

I tired to recorded using web protocol but its completely in binary code and very difficult for correlation.

 

As per your note if I do Binary to XML extension it would be easy for correlation.

 

I'm using both LR 11.04 and 11.52. Can you provide me that DLL file and how to use it please?

 

Thanks

 

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation