LoadRunner Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

XML correlation in Java over HTTP protocol

Highlighted
Occasional Advisor

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

 

9 REPLIES
Advisor

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

Occasional Advisor

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

HPE Expert

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.
Advisor

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

 

 

Occasional Advisor

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

Regular Advisor

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.

Occasional Visitor

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

 

Visitor

Re: XML correlation in Java over HTTP protocol

Hi All, Did anybody of us got the dll? is there a way we could download it ?

Occasional Contributor

Re: XML correlation in Java over HTTP protocol

Hi Rahual,

 

I have to test Smart client applications.I have used the application related Jar files and recoed the script with Java Over HTTP protocol.

 

I had replay the script and getting correlation error. I am unable to do the correlation, can you please help me on this issue.

 

I'm using  LR 11.04.

 

 

////////////////////// requestBody0.xml //////////////////////
RequestPayloadVo RequestPayloadVo0 = (RequestPayloadVo) JavaHTTP.readObject(RequestPayloadVoBA0);

long mylong = (long)lr2.fieldGetter(RequestPayloadVo0,"args[1]");   ---> I have correlated but not success.
mylong.put(5656556);
//

lr2.fieldSetter(RequestPayloadVo0,"args[1]",mylong);

ResponsePayloadVo ResponsePayloadVo0 = (ResponsePayloadVo) JavaHTTP.sendSerialized(RequestPayloadVo0, 0,

 

 

Thanks,

Machineni