Calling a Web Service

After you have successfully loaded a WSDL file you can explore the methods that the Web service offers by expanding the tree node of the Web-service proxy class.

By clicking one of the methods you will see the required input parameters and input header information for the Web-service call. You can customize your input data by either exchanging the default static values for the primitive types or by using global, local, or rendom variables. For additional information, refer to the .NET Explorer Help and the Silk Performer Help.

If a method is called for the first time on a Web service, the internal instance of the proxy class is instantiated. There is a property on the proxy class that holds a cookie container. This property is initialized with a new cookie container so that it can call Web services that handle cookies.

.NET Explorer then sets all the defined values for the SOAP headers to the corresponding member fields of the proxy class. Then a parameter list with all the values that are defined for the input parameters is created. Using this list, the method on the Web-service proxy object is invoked.

Microsoft .NET Framework includes a hooking mechanism that allows .NET Explorer to capture traffic that is passed between the .NET Explorer client and the Web server. You can view the trafic in the Show Traffic dialog box after the method call. You can invoke the dialog box on each Web service and each .NET Remoting call.

This feature is also used to generate BDL Web scripts with a WebPagePost for each Web-service call captured in the traffic moving from the client to the server.

The returned values and SOAP header information are displayed when the method calls return successfully. When exceptions occur, the exception text is displayed in a message box. Currently you cannot add method calls to test scenarios that throw errors because .NET Explorer requires information about the returned values.