activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From corrosion <>
Subject NMS.WCF not reaching my WCF service. Help needed.
Date Fri, 22 Mar 2013 10:30:05 GMT
Hi all,

I'm trying to have the NMS.WCF library working with a simple example. First
I tried using the MSMQ to get the feeling of queueing in WCF and got it
working. I had a queue and when dropping a message, I got my WCF service
called upon. This is exactly what I want to achieve with ActiveMQ. The proof
of concept I have is to make WCF work with ActiveMQ.
First of all, the binaries for the NMS.WCF are not availbale, only the
source code. I got the code, compiled it and have set up the following:

        <add name="nmsBinding" type="Apache.NMS.WCF.NmsBindingCollection,
Apache.NMS.WCF, Version=, Culture=neutral,
        <binding name="myNMSBinding" destination="RequestStateChange.Test"
      <service name="MesWCF.MesService"
        <endpoint address="tcp://localhost:61616" binding="nmsBinding"
bindingConfiguration="myNMSBinding" contract="MesWCF.IMesService"/>

        <behavior name="MesServiceBehavior">

          <serviceMetadata httpGetEnabled="False"/>

          <serviceDebug includeExceptionDetailInFaults="False"/>

My service and host code is like shown:

// Define a service contract. 
[ServiceContract(Namespace = "http://MesWCF")]
public interface IMesService
    [OperationContract(IsOneWay = true, Action = "*")]
    void GetState(string msg);
// Service class which implements the service contract.
// Added code to write output to the console window
public class MesService : IMesService
    [OperationBehavior(TransactionScopeRequired = true,
TransactionAutoComplete = true)]
    public void GetState(string msg)
        string messageBody = msg;
        Console.WriteLine("Processing {0} ", messageBody);

    // Host the service within this EXE console application.
    public static void Main()
        using (ServiceHost serviceHost = new

            // The service can now be accessed.
            Console.WriteLine("The service is ready.");
            Console.WriteLine("Press <ENTER> to terminate service.");

So it's a pretty basic contract that I have. I then try to test it by
sending a SOAP message to my RequestStateChange.Test queue, and by debugging
the NMS.WCF library I see the message being received, however the problem
seems to be that, afterwards, it tries to dispatch it but there's no one to
dispatch (like my WCF service). I see the QueueWaiter list, but this is an
empty list. I'm not sure if I'm missing some configuration in order to make
it work. There's no documentation or examples, so I can't compare my code.
Does anyone have an idea, it's a very basic example just trying to get a
string first. I also tried to change the contract and instead of a string I
had an IMessage, but the result is the same. Please help.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message