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:

<extensions>      
      <bindingExtensions>
        <add name="nmsBinding" type="Apache.NMS.WCF.NmsBindingCollection,
Apache.NMS.WCF, Version=1.6.0.3000, Culture=neutral,
PublicKeyToken=82756feee3957618"/>
      </bindingExtensions>
    </extensions>
    
    <bindings>
      <nmsBinding>
        <binding name="myNMSBinding" destination="RequestStateChange.Test"
destinationType="Queue">
          
        </binding>
      </nmsBinding>
    </bindings>
   
    <services>
      <service name="MesWCF.MesService"
behaviorConfiguration="MesServiceBehavior">
        
        <endpoint address="tcp://localhost:61616" binding="nmsBinding"
bindingConfiguration="myNMSBinding" contract="MesWCF.IMesService"/>
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="MesServiceBehavior">

          
          <serviceMetadata httpGetEnabled="False"/>

          <serviceDebug includeExceptionDetailInFaults="False"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

My service and host code is like shown:

// Define a service contract. 
[ServiceContract(Namespace = "http://MesWCF";)]
[ServiceKnownType(typeof(string))]
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
ServiceHost(typeof(MesService)))
        {
            serviceHost.Open();

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

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: 
http://activemq.2283324.n4.nabble.com/NMS-WCF-not-reaching-my-WCF-service-Help-needed-tp4665047.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to