This topic covers using .NET WCF HTTP with SOAtest.
The .NET WCF HTTP transport option allows you to invoke Windows Communication Foundation
(.NET 3.0, 3.5, or 4.0) web services that use the HTTP transport. For 4.0, the .NET 4 CLR / client runtime must be installed for this service.
SOAtest is able to understand WCF's system-provided
WSHttpBinding, and custom bindings that use the
HttpTransportBindingElement. The .NET WCF HTTP Transport can also be used to invoke Java-based HTTP web services for testing interoperability with .Net WCF Clients. For more information, see the following:
After selecting .NET WCF HTTP from the Transport drop-down menu within the Transport tab of an applicable tool, the following options display in the left pane of the Transport tab:
The endpoint is the URL of the web service endpoint. By default, tool endpoints are set to the endpoint defined in the WSDL. Besides WSDL, there are three other endpoint options:
A WCF configuration file is an XML file that is used to define configuration settings for both WCF clients and services. The tool acts as a WCF client and can be configured using the settings from a WCF configuration file. If the Web service being tested has a WSDL document or metadata endpoint, a WCF client configuration file can be automatically generated by the Microsoft Service Model Metadata Tool. The Microsoft Service Configuration Editor can also be used to create and edit WCF configuration files using a graphical user interface. These tools are widely available as part of Microsoft Windows SDK.
Tools can automatically determine endpoint binding information based on the policies defined in the WSDL, or based on the endpoint binding configuration defined in a WCF client configuration file. When the Constrain to WSDL tool option is selected, the endpoint's binding is automatically determined based on the policies defined in the WSDL. When Constrain to WSDL in unchecked, SOAtest will look in the specified WCF client configuration file for the endpoint's binding settings.
Tools can also use the endpoint behavior information defined in the WCF client configuration file. An endpoint behavior section containing a
clientCredentials element must be present if the service will be negotiating service credentials using certificates.
The following Configuration File options are available:
The Security options tab allows you to enter username and password information for various security credentials. In addition, the Open Certificate Manager option is available. Click Open Certificate Manager to open the Windows Certificate Manager. The Windows Certificate Manager allows you to manage any certificates needed for authentication when invoking your Web service. The WCF Configuration file may have references to certificates shown by the Windows Certificate Manager
From the Request tab, you can configure the SOAP envelope for the request message. This SOAP envelope is configured before any transport and message transformations, such as encryption. .NET WCF will automatically apply the message and transport security when you run the test. The XML Signer and XML Encryption tools are not necessary and should not be chained to the tool Also, no security headers need to be added to the SOAP request. The only SOAP header that should be present is a WS-Addressing header which SOAtest automatically adds if your test was created from a WSDL.
SOAtest supports flowed transactions via the WS-Atomic Transactions protocol and MS OLE Transactions protocol for WCF web services. For more information, see .NET WCF Flowed Transactions.
Global properties in the .NET System.Net.ServicePointManager class can be configured by setting java system properties on the SOAtest command line. The ServicePointManager.DefaultConnectionLimit limit property limits the number of HTTP keep alive connections between SOAtest and a remote host.
The default value for the DefaultConnectionLimit property is 2. If you are performing load testing and want more than two HTTP keep-alive connections, we recommend increasing this property.
For example, to set the DefaultConnectionLimit property to 50 you can pass "-J-DSystem.Net.ServicePointManager.DefaultConnectionLimit=50" as a command line argument when starting SOAtest. The full list of supported ServicePointManager properties that can be configured on the SOAtest command line are listed below:
For more information about these properties please see http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager_properties.aspx.