You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by stynor <st...@gmail.com> on 2013/02/27 00:27:54 UTC

Apache.NMS.WCF developers?

All - 

I have a need to use the NMS WCF library in a current project, but need
support for Request Reply. As far as I can tell, the current library does
not support Request Reply
(http://stackoverflow.com/questions/2053631/duplex-or-request-reply-with-apache-activemq-wcf-binding-configuration-question). 

I'm trying to understand how best to add this support.  Are any of the
original WCF devs are still on the mailing list?  Or if someone else has
enough WCF chops to help get me oriented.  

Better yet, my company is willing to pay to get this done (and of course we
will contribute the resulting code back to the project).  Any takers?

Thanks,
Steve
stynor at gmail dot com



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apache.NMS.WCF developers?

Posted by tw001 <wi...@hotmail.com>.
Hi, guys
My current project need to use Apache.NMS.WCF and I have encountered the
same issue, I debug into the source code of Apache.NMS.WCF,I can see the
message has been received by channellistener and call dispatch() to enqueue
the message but somehow it looks like doesn't hit in service layer. Does
anyone know how the channel layer   interacting with the service layer? I
don't understand what supposed should happen after put the message in the
queue. And I was wondering any update of this issue? Thanks a lot.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4674680.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apache.NMS.WCF developers?

Posted by Jim Gomes <e....@gmail.com>.
A JIRA ticket might be a good way of handing it off.  If it's a unit test,
that would be an excellent start to adding some unit tests to the WCF
provider.


On Thu, Feb 28, 2013 at 6:29 AM, stynor <st...@gmail.com> wrote:

> Thanks!   Yes, I'll send a test case - I'll need to clean up the code since
> the driver program I'm using is a bastardized adaptation of a unit test we
> used on a previous project with a different JMS implementation.
>
> Where should I post the code?  Should I open up a JIRA ticket and attach
> there?
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664260.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Apache.NMS.WCF developers?

Posted by stynor <st...@gmail.com>.
Thanks!   Yes, I'll send a test case - I'll need to clean up the code since
the driver program I'm using is a bastardized adaptation of a unit test we
used on a previous project with a different JMS implementation.  

Where should I post the code?  Should I open up a JIRA ticket and attach
there?





--
View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664260.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apache.NMS.WCF developers?

Posted by Jim Gomes <e....@gmail.com>.
Thanks for the config.  I'll take that and set it to my environment.  Would
you mind sharing your sample code that you have so far to send the initial
message?


On Wed, Feb 27, 2013 at 3:13 PM, stynor <st...@gmail.com> wrote:

> Its either that, or bitrot has set in and the code - which appears to be
> almost 5 years old now. Perhaps it simply no longer works with modern
> versions of .NET?   Since I can't find any documentation, or examples or
> unit tests I really don't know where to start.  I scraped together a
> working
> fire-and-forget client by using the config example from that stackoverflow
> code and massaging it a bit.  However that leaves me with a way to send
> messages but not receive them.
>
>
> jgomes wrote
> > Full disclosure on my side - I am a .NET developer, but I haven't used
> the
> > WCF bindings.  :-)
> >
> > From the message text in the exception being thrown, my first guess is
> > that
> > there is some kind of configuration setting that is missing.  It reads
> > like
> > it is trying to enforce/protect the WCF communication model.
>
>
> FWIW, my current app.config:
>
>
> <?xml version="1.0"?>
> <configuration>
>   <startup>
>     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
>   </startup>
>
>   <system.serviceModel>
>     <extensions>
>       <bindingExtensions>
>         <add name="nmsBinding"
>              type="Apache.NMS.WCF.NmsBindingCollection, Apache.NMS.WCF,
> Version=1.6.0.2979, Culture=neutral, PublicKeyToken=82756feee3957618"
>
>                  />
>       </bindingExtensions>
>     </extensions>
>
>     <bindings>
>       <nmsBinding>
>         <binding
>             name="NMS.queue.test1"
>             destination="queue.test1"
>             destinationType="Queue"
>                 >
>         </binding>
>       </nmsBinding>
>     </bindings>
>     <client>
>       <endpoint
>           address="tcp://10.28.21.101:61616"
>                 binding="nmsBinding"
>                 bindingConfiguration="NMS.queue.test1"
>         contract="FFServiceReference.FireAndForgetTestPortType"
> name="AccessHostedService" >
>       </endpoint>
>     </client>
>
>     <services>
>       <service name="test_ff_dotnet.Receiver">
>         <endpoint
>           address="tcp://10.28.21.101:61616"
>                 binding="nmsBinding"
>                 bindingConfiguration="NMS.queue.test1"
>        contract="FFServiceReference.FireAndForgetTestPortType"
> name="AccessHostedService" >
>         </endpoint>
>       </service>
>     </services>
>
>   </system.serviceModel>
>
> </configuration>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664228.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Apache.NMS.WCF developers?

Posted by stynor <st...@gmail.com>.
Its either that, or bitrot has set in and the code - which appears to be
almost 5 years old now. Perhaps it simply no longer works with modern
versions of .NET?   Since I can't find any documentation, or examples or
unit tests I really don't know where to start.  I scraped together a working
fire-and-forget client by using the config example from that stackoverflow
code and massaging it a bit.  However that leaves me with a way to send
messages but not receive them. 


jgomes wrote
> Full disclosure on my side - I am a .NET developer, but I haven't used the
> WCF bindings.  :-)
> 
> From the message text in the exception being thrown, my first guess is
> that
> there is some kind of configuration setting that is missing.  It reads
> like
> it is trying to enforce/protect the WCF communication model.


FWIW, my current app.config: 


<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>

  <system.serviceModel>
    <extensions>
      <bindingExtensions>
        <add name="nmsBinding"
             type="Apache.NMS.WCF.NmsBindingCollection, Apache.NMS.WCF,
Version=1.6.0.2979, Culture=neutral, PublicKeyToken=82756feee3957618"

                 />
      </bindingExtensions>
    </extensions>
    
    <bindings>
      <nmsBinding>
        <binding
            name="NMS.queue.test1"
            destination="queue.test1"
            destinationType="Queue"
                >
        </binding>
      </nmsBinding>
    </bindings>
    <client>
      <endpoint 
          address="tcp://10.28.21.101:61616" 
                binding="nmsBinding" 
                bindingConfiguration="NMS.queue.test1"
        contract="FFServiceReference.FireAndForgetTestPortType"
name="AccessHostedService" >
      </endpoint>
    </client>
 
    <services>
      <service name="test_ff_dotnet.Receiver">
        <endpoint 
          address="tcp://10.28.21.101:61616" 
                binding="nmsBinding" 
                bindingConfiguration="NMS.queue.test1"
       contract="FFServiceReference.FireAndForgetTestPortType"
name="AccessHostedService" >
        </endpoint>
      </service>
    </services>

  </system.serviceModel>

</configuration>





--
View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664228.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apache.NMS.WCF developers?

Posted by Jim Gomes <e....@gmail.com>.
Full disclosure on my side - I am a .NET developer, but I haven't used the
WCF bindings.  :-)

>From the message text in the exception being thrown, my first guess is that
there is some kind of configuration setting that is missing.  It reads like
it is trying to enforce/protect the WCF communication model.


On Wed, Feb 27, 2013 at 1:29 PM, stynor <st...@gmail.com> wrote:

> Well...  Where do I start :)
>
> Full disclosure: I'm a java developer trying to add support for our .NET
> developers.   I know just enough .NET to get myself into serious trouble.
>
> The NMS.WCF source does not have any example or test projects - and no
> documentation that I've been able to find.  The stackoverflow article I
> linked to does have an App.config excerpt that I've been able to adapt to
> get some semi-working code.
>
> I've built the NMS libs from source and have used them to create a simple
> one-way "fire and forget" message onto a queue via the WCF library.  So far
> so good.
>
> When it comes to creating a service to listen to that queue and does
> something with it, however, I get runtime exceptions.   At this point in
> NmsInputChannelListener.cs:
>
>                                 NmsInputChannel newChannel;
>                                 bool channelCreated =
> CreateOrRetrieveChannel(out newChannel);
>
>                                 Tracer.Debug("Dispatching incoming
> message");
>                         >>>>>   newChannel.Dispatch(message);
>
> I get an exception complaining that the channel is in Created state and
> needs to be in Open state.  I've stepped through the
> CreateOrRetrieveChannel() function and indeed - it creates a new channel,
> but does not open it.   Might I be missing something in my App.config?  Is
> there a test project I've not discovered that tests this code -- (i.e can I
> confirm that the WCF library itself still works and that it is my client
> code that is at fault?)
>
>
> Once I get past these very basics, I will probably be able to articulate
> more specific Request Reply questions.
>
>     DEBUG: Dispatching incoming message
>     ERROR: Error dispatching Message: System.InvalidOperationException: The
> communication object, Apache.NMS.WCF.NmsInputChannel, is in the Created
> state.  Communication objects cannot be used for communication unless they
> are in the Opened state.
>        at
> System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
>        at Apache.NMS.WCF.NmsInputQueueChannelBase`1.Dispatch(T request) in
>
> C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputQueueChannelBase.cs:line
> 79
>        at Apache.NMS.WCF.NmsInputChannelListener.Dispatch(Message message)
> in
>
> C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputChannelListener.cs:line
> 354
>
>
> jgomes wrote
> > Hi Steve,
> >
> > I read the reply from marc_s on that Stack Overflow link you provided.
> >  What is missing from his answer that you are needing?  It seems like he
> > covered the solution necessary for implementing request reply, or am I
> > missing something different in your requirements?
> >
> > Best,
> > Jim
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664222.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Apache.NMS.WCF developers?

Posted by stynor <st...@gmail.com>.
Well...  Where do I start :)

Full disclosure: I'm a java developer trying to add support for our .NET
developers.   I know just enough .NET to get myself into serious trouble.

The NMS.WCF source does not have any example or test projects - and no
documentation that I've been able to find.  The stackoverflow article I
linked to does have an App.config excerpt that I've been able to adapt to
get some semi-working code.

I've built the NMS libs from source and have used them to create a simple
one-way "fire and forget" message onto a queue via the WCF library.  So far
so good.  

When it comes to creating a service to listen to that queue and does
something with it, however, I get runtime exceptions.   At this point in
NmsInputChannelListener.cs: 

				NmsInputChannel newChannel;
				bool channelCreated = CreateOrRetrieveChannel(out newChannel);

				Tracer.Debug("Dispatching incoming message");
			>>>>>	newChannel.Dispatch(message);

I get an exception complaining that the channel is in Created state and
needs to be in Open state.  I've stepped through the
CreateOrRetrieveChannel() function and indeed - it creates a new channel,
but does not open it.   Might I be missing something in my App.config?  Is
there a test project I've not discovered that tests this code -- (i.e can I
confirm that the WCF library itself still works and that it is my client
code that is at fault?)


Once I get past these very basics, I will probably be able to articulate
more specific Request Reply questions.

    DEBUG: Dispatching incoming message
    ERROR: Error dispatching Message: System.InvalidOperationException: The
communication object, Apache.NMS.WCF.NmsInputChannel, is in the Created
state.  Communication objects cannot be used for communication unless they
are in the Opened state.
       at
System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
       at Apache.NMS.WCF.NmsInputQueueChannelBase`1.Dispatch(T request) in
C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputQueueChannelBase.cs:line
79
       at Apache.NMS.WCF.NmsInputChannelListener.Dispatch(Message message)
in
C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputChannelListener.cs:line
354


jgomes wrote
> Hi Steve,
> 
> I read the reply from marc_s on that Stack Overflow link you provided.
>  What is missing from his answer that you are needing?  It seems like he
> covered the solution necessary for implementing request reply, or am I
> missing something different in your requirements?
> 
> Best,
> Jim





--
View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664222.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Apache.NMS.WCF developers?

Posted by Jim Gomes <e....@gmail.com>.
Hi Steve,

I read the reply from marc_s on that Stack Overflow link you provided.
 What is missing from his answer that you are needing?  It seems like he
covered the solution necessary for implementing request reply, or am I
missing something different in your requirements?

Best,
Jim


On Tue, Feb 26, 2013 at 3:27 PM, stynor <st...@gmail.com> wrote:

> All -
>
> I have a need to use the NMS WCF library in a current project, but need
> support for Request Reply. As far as I can tell, the current library does
> not support Request Reply
> (
> http://stackoverflow.com/questions/2053631/duplex-or-request-reply-with-apache-activemq-wcf-binding-configuration-question
> ).
>
> I'm trying to understand how best to add this support.  Are any of the
> original WCF devs are still on the mailing list?  Or if someone else has
> enough WCF chops to help get me oriented.
>
> Better yet, my company is willing to pay to get this done (and of course we
> will contribute the resulting code back to the project).  Any takers?
>
> Thanks,
> Steve
> stynor at gmail dot com
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>