Highlighted
New Member.
434 views

Loadrunner DFE issue

I have made a simple GWT web application which returns a java.lang.String from a RPC call. After recording actions, Vugen replay fails with a following error

Action.c(130): web_custom_request("greet_2") started  	[MsgId: MMSG-26355]
Action.c(130): Error -27040: Data Format Extension: Extension: GWT - ERROR [GWT_DFE] - com.google.gwt.user.client.rpc.SerializationException: java.lang.ClassNotFoundException: button 2: Hello, GWT User!

  	[MsgId: MERR-27040]
Action.c(130): Error -27040: Data Format Extension: Extension: GWT - ERROR [GWT_DFE] - failed to read as a response

  	[MsgId: MERR-27040]
Action.c(130): web_custom_request("greet_2") highest severity level was "ERROR", 42 body bytes, 220 header bytes  	[MsgId: MMSG-26388]

Here is the call:

 

web_convert_from_formatted("FormattedData="
			"<HP_EXTENSION name=\"GWT\">"
				"<com.hp.dfe.GWT__Request>"
					"<moduleBaseURL>http://localhost8080/gwt-example/gwt_example/</moduleBaseURL>"
					"<rpcRequest>"
						"<flags>0</flags>"
						"<method>"
							"<class>com.example.client.GreetingService</class>"
							"<name>greetServer2</name>"
							"<parameter-types>"
								"<class>java.lang.String</class>"
							"</parameter-types>"
						"</method>"
						"<parameters>"
							"<string>GWT User</string>"
						"</parameters>"
						"<serializationPolicy class=\"com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy\"></serializationPolicy>"
					"</rpcRequest>"
				"</com.hp.dfe.GWT__Request>"
			"</HP_EXTENSION>", 
		"TargetParam=DFE_BODY_1", 
		LAST);


	web_custom_request("greet_2", 
		"URL=http://localhost:8080/gwt-example/gwt_example/greet", 
		"Method=POST", 
		"Resource=0", 
		"RecContentType=application/json", 
		"Referer=http://ce1-kennethchan:8080/gwt-example/", 
		"Snapshot=t5.inf", 
		"Mode=HTML", 
		"EncType=text/x-gwt-rpc; charset=utf-8", 
		"Body={DFE_BODY_1}", 
		LAST);

Here is the raw request and reponse

POST /gwt-example/gwt_example/greet HTTP/1.1
Accept: */*
Content-Type: text/x-gwt-rpc; charset=utf-8
X-GWT-Permutation: 693F6AE4DDF99DECB8FBEF700EA895CE
X-GWT-Module-Base: http://localhost:8080/gwt-example/gwt_example/
Referer: http://localhost:8080/gwt-example/
Accept-Language: en-GB
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: localhost:8080
Content-Length: 191
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache

7|0|6|http://localhost:8080/gwt-example/gwt_example/|FF260E458FFA2CF4FD526FE348A9D6F4|com.example.client.GreetingService|greetServer2|java.lang.String/2004016611|GWT User|1|2|3|4|1|5|6|

---------------------------

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet/3.0; JBossAS-6
Content-Disposition: attachment
Content-Type: application/json;charset=utf-8
Content-Length: 42
Date: Mon, 10 Jul 2017 03:10:53 GMT

//OK[1,["button 2: Hello, GWT User!"],0,7]

I found the Vugen cannot recongize the content in the body as String. But if I change reponse type from String to String[]. It works fine. Does anyone know why? I am using loadrunner 12.53.

Here is the raw request and reponse when return type is String[]

POST /gwt-example/gwt_example/greet HTTP/1.1
Accept: */*
Content-Type: text/x-gwt-rpc; charset=utf-8
X-GWT-Permutation: 693F6AE4DDF99DECB8FBEF700EA895CE
X-GWT-Module-Base: http://localhost:8080/gwt-example/gwt_example/
Referer: http://localhost:8080/gwt-example/
Accept-Language: en-GB
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: localhost:8080
Content-Length: 190
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache

7|0|6|http://localhost:8080/gwt-example/gwt_example/|FF260E458FFA2CF4FD526FE348A9D6F4|com.example.client.GreetingService|greetServer|java.lang.String/2004016611|GWT User|1|2|3|4|1|5|6|

----------------------

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet/3.0; JBossAS-6
Content-Encoding: gzip
Content-Disposition: attachment
Content-Type: application/json;charset=utf-8
Content-Length: 212
Date: Mon, 10 Jul 2017 03:10:20 GMT

//OK[2,1,1,["[Ljava.lang.String;/2600011424","button1: Hello, GWT User!<br><br>I am running JBoss Web/3.0.0-CR2.<br><br>It looks like you are using:<br>Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"],0,7]

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.