Forum Discussion

pete_youi's avatar
pete_youi
New Contributor
13 years ago

Testing of Web Services

Hi,



I am having an issue with the WebServices functionality of TC 8.7 that I hope someone can help with.

I have opened the sample project \Web Service Testing\Functional Testing that uses the sample service at http://www.automatedqa.com/examples/testcomplete/webservices/Service.asmx



This works fine with no errors however if I create a new Web Service item and point it to the same sample web service as above, I can add the service in the editor but when I call any method from a script I get the following VB Script error:



The remote server returned an unexpected response: (407) Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )



The only difference that I can find is that the original WebServices item has 1 file (SampleWebService.tcWS) that has all the data contained in it.

However the new WebService item has 2 files - SampleWebService2.tcWS and item0.wsdata



Any help would be much appreciated



Pete

3 Replies

  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)
    Hello Peter,



    The only difference that I can find is that the original WebServices item has 1 file (SampleWebService.tcWS) that has all the data contained in it.

    However the new WebService item has 2 files - SampleWebService2.tcWS and item0.wsdata


    This behavior is expected for TestComplete.



    To help us find out what is causing the Proxy authorization error, could you please specify whether you are using a proxy server to connect to the Internet?



    Also, could you please open TestComplete's Web Services Options dialog (Tools | Options | Engines | Web Services) and check whether the This computer is connected to the Internet via proxy option is enabled?



    Thanks in advance.
  • pete_youi's avatar
    pete_youi
    New Contributor
    Hi Julia,



    Thanks for your reply.

    We use auto detect to connect to the internet. TestComplete Web Services Option - connect via proxy is NOT enabled.



    With these settings as is, I can open the sample Web Services functional test and run the VB script that connects to the sample service. This connects and all tests pass with no problem.



    The problem arises when I add a new WebServices that is pointed to the same .asmx as in the sample ie. SampleWebService2

    When setting it up I can add the URL > Get Services and the Objects & Methods of the service are display exactly the same as the SampleWebService that came with the project. However, when I change the script to point to SampleWebService2 instead of SampleWebService, I then get the proxy error.  No changes have been made to proxy settings on the computer or TC. If I point back to SampleWebService again it works fine.



    As I said in my previous post, the only difference I can see is that the web service I create (SampleWebService2) has 2 files and the original sample only has 1 file.



    Pete 

     


  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Peter,


    As I said in my previous post, the only difference I can see is that the web service I create (SampleWebService2) has 2 files and the original sample only has 1 file.


    The format of storing Web Service project items was changed, that is why, TestComplete creates two files to store newer Web Service items, while the original item is stored in a single file. This is the expected behavior.


    However, the fact that the newer Web Service items do not provide proper access to the target web service methods is not expected, and it is quite strange behavior for TestComplete.

    Thank you for reporting the problem. I have registered it in our database. Sorry for the inconvenience.


    Please let us know if you have any other questions.

    Thank you.