Micro Focus QTP (UFT) Forums
Problems in 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Problems in web services (/Thread-Problems-in-web-services)



Problems in web services - bc993aaa - 06-27-2008

hello all,

I am facing the following problem in QTP 9.5. I am using the web services add-in to test..well..web services Tongue

anyways, the following is the code;

Code:
WSOrdReq = WebService("WSWebSer").WSOrdReq(DataTable("Branch", dtGlobalSheet), DataTable("Company", dtGlobalSheet), DataTable("Login", dtGlobalSheet), DataTable("Password", dtGlobalSheet), DataTable("MISMO_Ver", dtGlobalSheet), DataTable("DataStream", dtGlobalSheet))

XMLFile("WS.xml").Check CheckPoint("WS.xml")

When the arguments are all valid, the web service returns an XML output which is verified via an xml checkpoint above, however, when an invalid argument is passed or an argument which does not generate any data, the web service is supposed to generate an exception, which it does, but that exception basically stops QTP's test run.

Now i need to capture that exception and add a checkpoint to verify whether its the intended exception thrown by the web service e.g. an exception is supposed to be thrown when an invalid login is sent...my checkpoint will verify actual and expected exception but it cannot as the exception is generated and shown by QTP in an error message and it stops execution.

Need help. Sad


RE: Problems in web services - bc993aaa - 07-08-2008

Ok people,

On Error Resume Next basically solves that problem...so either no one knew the solution...hardly the case, i believe, or no wanted to help...neways, this was just a simple test question to see whether anyone actually does reply to a prob...

test failed i guess


RE: Problems in web services - Ankur - 07-09-2008

There can be always an oversight, you are free to bump your thread after say 3 days...but refrain from making this kind of remark in future.


RE: Problems in web services - bc993aaa - 07-09-2008

will do Smile