WebService object properties are not being recognized
I'm aware I am posting regarding a relatively old product, but I've looked for solutions anywhere
and couldn't find any similar problem, so I'm hoping to find one here.
I am using QTP ver 11 with the WebService Add-on (Not Service test, nor the newer UFT).
Using the Web Service Object Wizard, I've added an object of type webservice to the repository, by loading a local WSDL file. I've also set it's URL, used the methods that were recognized, and used the XML warehouse to define checkpoints.
No problems so far.
However, For some strange reason, this object properties are not recognized when I use the shared repository.
Furthermore, If I reload the test or the QTP application, these properties disappear, and only the object's name remains.
I've tried Everything: I could not have manually created this object, as there is no webservice type object available.
I've tried creating a webservice object dynamically in the code, but found no such method (I could only set properties to an existing object).
Is there anyone who had entangled this problem, or know anything about it?
and if not, does anyone know if there is an option to create a web service object not using the wizard?
I'd be very thankful for any sort of assistance, as I'm stuck with this problem for the past three weeks..
I only tinkered with the Webservice add-on a little bit years ago before going with a straight vbs code solution. Number of examples out there if you just google "test webservice with vbs".
These days SoapUI is pretty standard for webservice testing and offers a free version that supports command line calls. I would probably work towards that rather than work with an old version of a tool that I'm guessing you don't have a current support contract with. Since the behavior you're talking about sounds like something you would want to log a support ticket over.
Hey, Thanks for your reply!
I've actually tried searching for something similar, but my problem is not just using vbs,
but defining such an object in qtp (so as to save time building XML structures), otherwise I would have used The Visual Studio test solutions.
I also tried using SoapUI free version, but it limits the use of database input on the freeware version, and also does not support testing of a business process (in my case, I also need to run DB queries, check log files, calculate amounts and use logical operations).
We do have a support contract, but I was hoping that perhaps this issue can be solved easily if anyone had entangled it before..
Free version of SoapUi does not allow parameterisation of input data from a spreadsheet and the paid-for version only supports Excel upto 2003 (xls) (that was 6 months ago when I last used it). The paid-for version is only around 230 GBP or 400 USD.
If you have to use the QTP webservice addin you should look at using NU4aN suggestion of vbs (or you might see it referenced as DP). I've used this extensively in the past and it works Ok. However there is potentially a lot of XML processing to do once your call has returned a response and SoapUi + Groovy make it a lot easier to handle.
Here is a sample DP Webservices call I wrote and used a while ago, please note this is specific to the webservice I was calling, this is only meant to show you how to go about using name:value pairs in the call
' Define INT3 WebService
wsWSDL = "wsdl:=http://9188.8.131.529:8080/testframeworkwebapp/services/STFSQLExecutionService?WSDL"
' Define service & port
wsService = "service:=GenericSQLExecutorService"
wsPort = "port:=STFSQLExecutionService"
' Define Webservice calling parameters
param1 = "TS12345"
param2 = "Select * From SBYN_PERSON Where LID = '9800529284'"
param3 = "pds.database"
' Call to the WebService
executeSQLByDBName = WebService(wsWSDL, wsService, wsPort).executeSQLByDBName(param1, param2, param3)
So I understand from your response that I can send Soap requests this way, but can not use the XML warehouse, as the WebService
object methods are not known (meaning that for each response I have to do the parsing). But if I use SoapUI, on the other hand,
it'll be problematic to run Oracle queries and other scripts from there, right?
Bummer. I think I'll go either with the vbs option, or just use C++ gSoap instead,
if there is no other option..