Creating Microsoft .NET transport configurations

You can manually create a Microsoft .NET transport configuration to describe the transport settings for service requests that use the Windows Communication Foundation (WCF) protocol.

Before you begin

If you are using SOAP security, ensure that the environment is configured with the correct libraries and configuration files.

Certificates and libraries required by the Microsoft client proxy must be installed on the computer, including Microsoft .NET libraries.

You must link a modified version of the Microsoft client proxy configuration file of the WCF service (by default client.exe.config) to the Microsoft .NET transport configuration. You must rename the file to soaclient.exe.config and edit it as described in the following procedure.

Tip: You can create a Microsoft .NET transport configuration automatically by importing the Microsoft .NET WSDL file. In this case, you must still manually edit the Microsoft .NET transport configuration to point to the modified soaclient.exe.config file as described in the following procedure. For more information, see Sending service requests with WSDL files

About this task

The product supports testing WCF services that use the following bindings:
  • BasicHttpBinding
  • WsHttpBinding
  • NetMsMqBinding for 1-way calls only
  • WSFederationHttpBinding
  • WS2007FederationHttpBinding
  • NetTcpBinding
  • Custom bindings that do not integrate custom extensions in the channel, serialization of the message, transport, and security
Note: The following WCF services are not supported:
  • Transaction and scopes
  • Duplex mode requests, such as callbacks or 2-way services based on the Microsoft Message Queuing (MS-MQ) transport
To use Generic Service Client with IBM Appscan to test a WCF application, add the following code to the WCF configuration file:
<system.diagnostics>    <trace autoflush="true" />   
      <sources>      <source name="System.Net"
      maxdatasize="1048576"><listeners><add
    name="System.Net"/></listeners></source>      <source
      name="System.Net.Cache"><listeners><add
      name="System.Net"/></listeners></source>      <source
      name="System.Net.Http"><listeners><add name="System.Net
      "/></listeners></source>      <source
      name="System.Net.Sockets"><listeners><add
      name="System.Net"/></listeners></source>      <source
      name="System.Net.WebSockets"><listeners><add
      name="System.Net"/></listeners></source>    </sources>   
      <sharedListeners>      <add
    name="System.Net"          
      type="IBM.ServiceModel.Soa.Extension.tools.TrafficTraceListener,
      Soa-Behavior-Library"          
    initializeData=""       />   
    </sharedListeners>    <switches>      <add name="System.Net"
      value="All"/>      <add name="System.Net.Cache"
    value="All"/>      <add name="System.Net.Http"
    value="All"/>      <add name="System.Net.Sockets"
    value="All"/>      <add name="System.Net.WebSockets"
    value="All"/>    </switches></system.diagnostics>
IBM Appscan expects only HTTP requests in WCF. The following HTTP bindings are supported:
  • BasicHttpBinding
  • Custombinding above standard httpTransport
  • WsHttpBinding
  • WsFederationHttpBinding
  • WS2007FederationHttpBinding
Also, the following patterns are supported:
  • Action value ( mandatory )
  • Reply Action value ( mandatory )
  • Protection level

Procedure

  1. Create a modified soaclient.exe.config file by completing the following steps:
    1. Create a copy of client.exe.config (or proxy_client_name.config) file from the Microsoft .NET project and rename the copy to soaclient.exe.config.
    2. Edit the soaclient.exe.config file to use the version of Microsoft .NET that the product supports, as specified on the following line:
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    3. Edit the soaclient.exe.config file so that the endpoints in the configuration file point to the client contract of the product, as specified on the following line:
      contract="IBM.ServiceModel.Soa.Extension.Stub.IStubTest"
    4. Import the modified soaclient.exe.config file into the workspace.
    After you create the soaclient.exe.config file, you can skip the following steps and import the WSDL file to automatically create a Microsoft .NET transport configuration based on the information provided by the WSDL. For more information, see Sending service requests with WSDL files.
  2. Click the Generic service client toolbar button (Open the generic service client) to open the generic service client and click the Transport tab.
  3. On the Transport Configurations page, click Create a Microsoft .NET configuration.
  4. Type a name for the new transport configuration and specify the following options:
    Location of soaclient.exe.config
    Specify the location of the soaclient.exe.config file. You must create this file manually by copying and editing the client.exe.config file from the Microsoft .NET service.
    User authentication
    If the service requires authentication, select User Authentication and type the user name and password to access the service.
    Endpoint protection
    By default, the transport configuration uses the endpoint protection level that is described in the soaclient.exe.config file. Use this setting to specify a different Protection level:
    • Signature: Select this option to digitally sign requests.
    • Encryption and Signature: Select this option to digitally sign and encrypt requests.
    Advanced properties
    Use this table to list the request and response actions by order of the methods in the WSDL file. Click Add to specify the name and value of request and response actions that are required by the service. This table is generated automatically when you import a Microsoft .NET WSDL file.
  5. Click OK to create the transport configuration.

What to do next

After you create the configuration, you can use it with any service call that uses the Microsoft .NET transport protocol. You can use the Configurations list in the generic service client to edit existing configurations or to create duplicate configurations.
Feedback