Micro Focus QTP (UFT) Forums
Testing Web Services - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Testing Web Services (/Thread-Testing-Web-Services)

Pages: 1 2


Testing Web Services - sohalshah - 08-19-2009

I am trying to test web services in QTP, but i am getting following error:

Quote:Unable to generate the steps. Run the Web Service Testing wizard again.

I have attached the snapshot for your reference.
Note: Web Service add in is already added.

Please guide me how to proceed further.


RE: Testing Web Services - Ankur - 08-20-2009

I am also interested in knowing the solution for the same. If anyone has encountered the problem earlier (or know the solution), please let us know.


RE: Testing Web Services - Tarik Sheth - 08-20-2009

Hi,

First couple of queries.

1. Is WSDL file opening correctly when you navigating it through browser.
2. If yes then is your security settings placed correctly.

It would be helpful if you can attach your 'Set security Option' screen.


RE: Testing Web Services - sohalshah - 08-20-2009

Hi,
I am able to open WSDL file in browser successfully and this is unsecured url, still do i need to set up security settings? I did not select "Include security settings in the generated web service test" from web service testing wizard.

Thanks,
Sohal


RE: Testing Web Services - Tarik Sheth - 08-20-2009

Hi,
Please verify below mentioned settings.
1. Identify which dot net framework it is using.
2. If the Webservice is .Net 2.0 based one. In QTP's File-> Settings->Web Service -> Run Webservice using Toolkit , selected the item ".Net framework 2.0 WS 3.0".
3. Try doing Check the checkbox for "Include scurity settings" in the generated web servvice test.
4. you can use Winhttp object to verify alternatively. (like- Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")


Query:

1. Which token have you selected in the security setting?
2. Is there any SSL layer.


RE: Testing Web Services - sohalshah - 08-21-2009

Hi,
We are using Axis framework, and don't have any SSL Layer.
Snapshots for settings and options are attached for the reference.

Thanks,
Sohal


RE: Testing Web Services - Tarik Sheth - 08-21-2009

Hi,
Ok. Thanks.
1. Are you using SetProxy Method?
2. Is this setting Ok? "File -> Settings ->Web Services Tab -> Selected Apache Axis 1.x"
3. Can you please try with this public service--> http://www.webservicex.net/ConvertTemperature.asmx

Thanks


RE: Testing Web Services - sohalshah - 08-21-2009

Hi,

Thanks, I was able to generate the steps with checkpoints for provided URL from you. But i am unable to do it for my WSDL. Also i checked all settings are set for Apache Axis 1.x. I am wondering why it is not working for me?
Snapshot is attached for the reference.

Also please let me know what is the other alternate?

Thanks,
Sohal


RE: Testing Web Services - Tarik Sheth - 08-22-2009

Hi,

1. Just verify giving the path for WS-I validation location as
C:\<Test Folder>

2. Use the WS- I validation tool to test the web services and its interoperability basically. Interoperability Testing Tools 1.1, is a third-party application and is not provided with QTP.


I could think of the following alternate solution:

You can use XML DOM, WinHttp and templates for verifying the web services XML.



Code:
strXMLTempFile = "c:\test\ws\Templates.xml"
strTemplate = "Template"
Msgbox getXMLTemplate (strXMLTempFile, strTemplate)
Function getXMLTemplate (strXMLTempFile, strTemplate)

Set xmlDoc = CreateObject("Msxml2.DOMDocument")

'load XML file

xmlDoc.load(strXMLTemplateFile)

'Check XML syntax

If (xmlDoc.parseError.errorCode <> 0) Then
' Parse XML to verify the tags

Set myErr = xmlDoc.parseError

Msgbox "ERROR: " & myErr.reason
End If
' Same way verify the template

Set xmlDoc = Nothing

let us know if this helps.


RE: Testing Web Services - iagarab - 01-08-2010

Hi!
I'm new automating Web Services. I have no problem when all in XML Request structure it's ok, but when I try to send a request with invalida Data, All the time QTP shows me this message:

The createOffer operation call failed.
The .NET Framework 2.0 WSE 3.0 toolkit returned the following error:
There is an error in XML document (37, 10).

Exception from: System.Xml
The string '' is not a valid AllXsd value.
Line (24): "Set createOffer = WebService("WSOfferImplService").createOffer(XMLWarehouse("createOffer"))".

But I need to send the request exactly with invalida data, what can I do?