Tuesday, 18 February 2014

Trouble scripting against a secure webservice that uploads files via MTOM

Trouble scripting against a secure webservice that uploads files via MTOM


Problem Details:- I am currently testing a secure webservice that uploads files to an IBM FileNet server via MTOM. The service uses two way authentication through a certificate which has been installed on the root of the machine I am scripting on.

The service is functioning when tested using SoapUI.

I have imported the WSDL using VUGEN for the service that i am testing.

I then added a call to the operation for uploading a file. I have also added the custom header with the username and password for the service.

When I run the service I am getting errors and the files are not uploaded to FileNet. Please note that I have successfully scripted against some of the other operations for same WebService, i.e. retrieve document details and this works ok so I dont think its an authentication issue that I am encountering.

From the documentation i have found so far I believe that VUGen supports MTOM. Can you advise the correct method of adding a webservice call to add an attachement via MTOM.

I will update my script as an attachement as well as the errors encountered. Not i have tried but Soap_Request and Web_service call.

Problem Solution:-  When LoadRunner (LR) executes a Web Services/MTOM script it uses a Microsoft WCF router within the Load Generator machine for communicating with the Web server. This can be confirmed in the Vugen replay log. For example:

<snip>
action.c(5): Web service call "Open_document_102" started
action.c(5): Creating handler
action.c(5): Searching for wcf router
action.c(5): Preparing router
<snip>

The LR Controller picks up the Web Resource metrics such as "Hits per Second" and "Throughput" from the LR HTTP replay engine running on the Load Generator. However, the LR HTTP engine is bypassed in this case and these metrics are not available from an Microsoft WCF router. This explains why there is no data in the "Hits per Second" or "Throughput" graphs in the Analysis session containing a Web Services/MTOM script.



The web_add_header function can be used to specify a custom header in "simple" Web Services scripts where no scenario is specified (in the "Protocol and Security" tab in "Manage Services").

However if a scenario type is specified in the Web Services script, for example, "MTOM" is selected, the web_add_header function cannot be used to specify a custom header. This usage is not currently supported by LoadRunner.

An enhancement request has been submitted to add this capability to LoadRunner for the Web Services protocol.

Please install vugen 11 patch 3 that I have uploaded to the case FTP
ftp://SC0441f1:my=XV5nx@ftp.usa.hp.com/

the file name is: LRVUG_00015.exe

11 comments: