WCF

Table of Contents

1 High level status

1.1 Features

1.2 Milestones

2 Detailed Status

2.1 Core Compare

3 Configuration
4 Contracts

4.1 Serialization

4.2 Service Contract

4.3 Policy & Binding

5 Service Runtime Behavior

5.1 Transaction Behavior
5.2 Dispatch Behavior
5.3 Concurrency Behavior
5.4 Error Behavior
5.5 Throttling Behavior
5.6 Metadata Behavior
5.7 Instance Behavior
5.8 Message Inspection
5.9 Parameter Filtering

6 Message Encoding

6.1 Binary
6.2 Text
6.3 Mtom
6.4 Web

7 Activation and hosting

7.1 EXE
7.2 IIS

Communication Foundation

Olive comprises Windows Communication Foundation (WCF) stack for building SOA-based applications. Its development is in early stages, but you can read Mono Olive: Introducing Windows Communication Foundation notebook (http://www.youcannoteatbits.org/Files/Mono%20Olive%20Notebook%20-%2018-09-07.pdf) for further help on building, fundamentals and contributing (building steps are outdated; please, check mono-olive (http://groups.google.com/group/mono-olive) for further help).

Some of the WS-* specifications that the Communications Foundation uses are available here (http://www.microsoft.com/interop/osp/default.mspx).

High level status

The following status is gathered based on execution of samples in http://msdn2.microsoft.com/en-us/library/ms756478.aspx

The initial goals focus on basicHttpBinding, so the samples were converted to use basicHttpBinding.

Many blocking bugs were fixed in order to achieve an initial status.

At this point almost none of the samples work out of the box.

Each non working sample was analyzed in order to understand the source of the failure.

Features

Serialization

Service contracts

Service features

Channels

Configuration

Bindings

Milestones

Milestone 1 - Basic connection establishment - achieved

Milestone 2 - Web Services support

The purpose of this milestone is to achieve roughly fully functional WCF API, although many of the new WCF features will not be working. Our hopes are that after achieving this milestone, many WCF applications will be able to run by modifying the configuration files to remove those unsupported features.

In order to achieve this milestone we need to support the following:

Milestone 3 - WS-Security and all relevant stuff

Milestone 4 - Infocard implementation

Milestone 5 - everything else

Not on the list

Detailed Status

Core Compare

Following is detailed analysis of status performed based on core compare results of 22/3


Total

System.Collection.Generics

System.IO

System.Service.Model

System.ServiceModel.Activation

System.ServiceModel.Channels

System.ServiceModel.ComIntegration

System.ServiceModel.Configuration

System.ServiceModel.Description

System.ServiceModel.Dispatcher

System.ServiceModel.MsmqIntegration

System.ServiceModel.PeerResolvers

System.ServiceModel.Security

System.ServiceModel.Security.Tokens

Configuration

Contracts

Serialization

Data Contract

DataContract serialization - supported. Tested and works with some simple scenarios. Fails on ICalculatorService and other data contract types

Message Contract

Typed Messages

Not working well.

Using Streams

Service Contract

Proxy Generator

This generator is a runtime generator for creating the proxy type. Mono has an implementation that uses CodDom, which Mainsoft can’t use. (Their solution is probably will be based on Java Dynamic Proxies.)

Policy & Binding

Binding Element Types

Basic

Binding Element

Description

Mono Status

Relevant to GH

OneWayBindingElement

A binding that supplies a one-way conversion layer

Implemented

 

TransportBindingElement

The base of all of the transport binding elements provided

For now, only HttpTransportBindingElement is implemented, probably TcpTransportBindingElement is the next one. for detail see bellow on TransportBindingElements

 

 

CompositeDuplexBindingElement

Represents the binding element that is used when the client must expose an endpoint for the service to send messages back to the client

Not Implemented

 

StreamUpgradeBindingElement

Indicate that a custom stream upgrade provider should be used, for example when adding a compression to a text stream

Implemented, Abstract.

 

PrivacyNoticeBindingElement

Represents the binding element that contains the privacy policy for the WS-Federation binding

 

 

UseManagedPresentationBindingElement

used to communicate with a CardSpace Security Token Service that supports the CardSpace profile of WS-Trust

Not Implemented

 

ReliableSessionBindingElement

Supports reliable session between endpoints

Not Implemented

 

SecurityBindingElement

An abstract class that, when implemented, represents a binding element that supports channel SOAP message security

Seems to be implemented as an abstract class

 

MessageEncodingBindingElement

The base of all Encoding Elements such as ‘TextMessageEncodingElement’, used to encode and decode messages between endpoints.

Partially implemented only to get the text encoder work.

 

PeerResolverBindingElement

Defines the abstract base class for binding elements used to create peer resolver objects

Not Implemented

 

TransactionFlowBindingElement

This element allows you to enable or disable incoming transaction flow in an endpoint’s binding settings, as well as to specify the desired protocol format for incoming transactions

Partially implemented

 

ContextBindingElement

 

 

 

TransportBindingElement

Binding Element

Description

Mono Status

Relevant to GH

PeerTransportBindingElement

 

 

Not Implemented

 

HttpTransportBindingElement

 

used to specify an HTTP transport for transmitting messages

Implemented

 

HttpsTransportBindingElement

 

used to specify an HTTPS transport for transmitting messages

Not Implemented

 

TcpTransportBindingElement

 

used to specify an TCP transport for transmitting messages

Implemented

 

NamedPipeTransportBindingElement

 

Named Pipe transport

Not Implemented

Not relevant

MsmqTransportBindingElement

MsmqIntegrationBindingElement

 

Integration with ms.net message queue

Not Implemented

Not relevant

ConnectionOrientedTransportBindingElement

 

Base of TcpTransportBindingElement

Implemented, Abstract

 

StreamUpgradBindingElement

Binding Element

Description

Mono Status

Relevant to GH

SslStreamSecurityBindingElement

supports channel security using an SSL stream

Not Implemented

 

WindowsStreamSecurityBindingElement

 

Not Implemented

Not relevant

SecurityBindingElement

Binding Element

Description

Mono Status

Relevant to GH

AsymmetricSecurityBindingElement

Supports public key encryption

Implemented

 

SymmetricSecurityBindingElement

Supports shared key encryption

Implemented

 

TransportSecurityBindingElement

Base class of security elements

Implemented

 

MessageEncodingBindingElement

Binding Element

Description

Mono Status

Relevant to GH

BinaryMessageEncodingBindingElement

Binary format

Implemented

 

MtomMessageEncodingBindingElement

Binary optimized format, Microsoft specific

Not Implemented in System.Runtime.Serialization

 

TextMessageEncodingBindingElement

Text format

Implemented

 

WebMessageEncodingBindingElement

 

Implemented

 

PeerResolverBindingElement

Binding Element

Description

Mono Status

Relevant to GH

PeerCustomResolverBindingElement

 

 

 

PnrpPeerResolverBindingElement

 

 

 

Binding Types

BasicHttpBinding

Is the only built in binding that has a reasonable status, and can be used to host a service. This binding supports two TransportBindingElements:

  1. HttpTransportBindingElement – This is not fully implelmented, main aspects are:
    1. Stand Alone executable - On the hosting side seems to be implemented with a stand alone http listener, the client seems to be implemented via WebRequest & WebResponse.
    2. IIS hosting - A handler for System.Web is basically implemented, but need to be integrated into ASP.NET, I have seen a bug right now that the configuration is not taken from Web.Config.
  2. HttpsTransportBindingElement – This element is not implemented due to missing implementation of the corresponding IChannelListener.

In addition it supports two MessageEncodingBindingElements

  1. TextMessageEncodingBindingElement – which is supported
  2. MtomMessageEncodingBindingElements – which is missing because of lack of encoder implementation in System.Runtime.Serialization dll.

When security is on this Binding uses the AsymetricSecurityBindingElement using certificate validation (https).

WSHttpBinding

Represents an interoperable binding that supports distributed transactions and secure, reliable sessions Note: The WSHttpBinding implementes a number of WS-* specifications such as:

These specifications are also implemented and sun project name 'Tango', and sun claims to be interoperable with .NET WCF implementation. The existance of the stack in an open source java project may be very helpfull for us.

Current Status: not impelmented

WebHttpBinding

expose WCF Web services through HTTP requests that use “plain old XML” (POX) style messaging instead of SOAP-based messaging

NetPeerTcpBinding

A secure tcp based Binding for peer to peer network application.

NetTcpBinding

A Binding that uses Tcp as the transport layer This binding by default uses the following elements:

  1. TcpTransportBindingElement
  2. BinaryMessageEncodingBindingElement
  3. SymetricSecurityBindingElement

WSDualHttpBinding

A WS interoperable binding that is used with duplex service contracts.

CustomBinding

MsmqBindingBase

NetNamedPipeBinding

Service Runtime Behavior

The behaviors controlls the runtime behavior of the service. There are some built in behaviors as detailed bellow, and the user can add custom behavior. A behavior can be achieved either by inheriting from IServiceBehavior interface or by applying the ServiceBehavior attribute to a service contract. If inheriting from IServiceBehavior then applying the behavior to the service is gained by implementing the method:

void IServiceBehavior.ApplyDispatchBehavior ( ServiceDescription description,ServiceHostBase serviceHostBase)

The ServiceBehavior Attribute contains serveral properties that referrs to different behaviors as detailed bellow.

Transaction Behavior

Defines the behavior of the transaction in terms of timeout, isolation and commit policy. This behavior is reached by applying the ServiceBehavior attribute to a service contract, and definning the following properties:

Status: Not Implemented

Dispatch Behavior

Concurrency Behavior

This behavior is applied using the ServiceBehaviorAttribute with the ConcurrencyMode enumeration, which controls whether an instance of a service processes messages sequentially or concurrently

Status: Not Implemented

Error Behavior

Throttling Behavior

Basically controls how many messages are processed. The configuration parameters are:

Status: Not Implemented

Metadata Behavior

This behavior enables/disables MetadataExchange of a service. It achieved by an instance of 'ServiceMetadataBehavior' that is applied to a service host.

Status: It seems to be that some work on this exist, but i can't get a good status here. In practice I could not retrieve the metadata from a mono based service.

Instance Behavior

This behavior specifies how many instances of the service can be run. This behavior is applied by the ServiceBehavior attribute. The options are defined by the InstanceContextMode enumeration:

Status: Only InstanceContextMode.Single is implemented.

Message Inspection

Parameter Filtering

Message Encoding

Binary

Implemented.

Text

Implemented

Mtom

Not Implemented

Web

Implemented

Activation and hosting

EXE

IIS