Contents tagged with SOA

  • WCF Extensibility - Part 2

    Service Description

     Service Description at Runtime

    Figure 2. ServiceDescription at runtime


    The Service Description is the heart of the service and is created when a ServiceHost or client ChannelFactory is created to describe all aspects of the service, endpoints and behaviors. This description is a logical view of what the WCF runtime is going to build when the Open method on the ServiceHost is executed, and also is used to generate the WSDL and policy metadata for the service. This metadata is exposed through the ServiceDescription class and the Description property on the ServiceHost and can be changed, for example, by injecting behaviors. To build the ServiceDescription information the WCF runtime first reflects over the service types and then it loads the service configuration. This information is then used when you execute the Open method of the ServiceHost to build the runtime.

    In the code shown below you can see how the service description information could be accessed and modified:


    // Construct the ServiceHost
    ServiceHost host = new ServiceHost(typeof(EchoService), new Uri(“http://localhost/echo”) );
    // Add endpoints to description
    host.AddServiceEndpoint(typeof(IEchoService), new BasicHttpBinding(), “”);
    // You can access the Description property of the host
    // And you can change things before calling Open
    foreach( ServiceEndpoint endpoint in host.Description.Endpoints )
             // Add My behavior to all Http endpoints
             If( endpoint.Uri.Scheme == “http” )
                     endpoint.Behaviors.Add( new MyHttpBehavior() );
    // Open the Host

    Next post: Building a Custom ServiceHost


    Andrés G Vettori
    EDS Top Gun - .NET Capability Architect

    Leader of the C# Community of the Microsoft Users Group Argentina


  • Framework.Messaging & WS-ReliableMessaging

    Well, our new messaging subsystem has reached "Release Candidate" status. After some initial stress and stability testing we have a messaging subsystem that is far superior to what we have in production now, and we have some more work to do yet.


  • Framework.Messaging & WS-ReliableMessaging

    Well, i'm currently working on Venezuela, participating in the implementation of the solution we have been working for more that two years. This isn't our first implementation so everything went very smooth for us, so smooth that we are going to take a mini-vacations to Isla Margarita for two days!