activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JMan_JE <JohannesElsingho...@gmx.net>
Subject Re: NMS WCF Binding
Date Thu, 23 Jul 2009 09:43:29 GMT

When i change the OperationContract of my service operation to IsOneWay=true,
i now get this exception:

The CustomBinding on the ServiceEndpoint with contract 'IService1' lacks a
TransportBindingElement.  Every binding must have at least one binding
element that derives from TransportBindingElement.
   at System.ServiceModel.Channels.Binding.EnsureInvariants(String
contractName)
   at System.ServiceModel.Description.ServiceEndpoint.EnsureInvariants()
   at
System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint
serviceEndpoint)
   at System.ServiceModel.ChannelFactory.CreateFactory()
   at System.ServiceModel.ChannelFactory.OnOpening()
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout)
   at System.ServiceModel.ChannelFactory.EnsureOpened()
   at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress
address, Uri via)
   at System.ServiceModel.ChannelFactory`1.CreateChannel()
   at System.ServiceModel.ClientBase`1.CreateChannel()
   at System.ServiceModel.ClientBase`1.CreateChannelInternal()
   at System.ServiceModel.ClientBase`1.get_Channel()
   at Service1Client.GetData(Int32 value)

My config looks like this:
 <bindings>
      <nmsBinding>
        <binding name="myNMSBinding" destination="test.queue">
        </binding>
      </nmsBinding>
    </bindings>
    <extensions>
      <bindingElementExtensions>
        <add name="nmsTransPort" type="Apache.NMS.WCF.NmsTransportElement,
Apache.NMS.WCF, Version=1.1.0.1642, Culture=neutral,
PublicKeyToken=82756feee3957618" />
      </bindingElementExtensions>
      <bindingExtensions>
        <add name="nmsBinding" type="Apache.NMS.WCF.NmsBindingCollection,
Apache.NMS.WCF, Version=1.1.0.1642, Culture=neutral,
PublicKeyToken=82756feee3957618" />
      </bindingExtensions>
    </extensions>

<endpoint address="tcp://johannes-xp:61616" binding="nmsBinding"
          bindingConfiguration="myNMSBinding"
contract="WcfServiceLibrary2.IService1" />

I tried to add a <nmsTransPort/> into the binding, but then i get an unknown
element exception.

Anybody has clue whats wrong here?

Thanks, Johannes


JMan_JE wrote:
> 
> Hello,
> i try to configure a nms binding for a simple (the one created by the vs
> 2008 template) wcf service.
> When i run the test client it throws this exception:
> System.InvalidOperationException: Contract requires TwoWay (either
> request-reply or duplex), but Binding 'NmsBinding' doesn't support it or
> isn't configured properly to support it.
>    at
> System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo
> stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode
> listenUriMode, Boolean supportContextSession, IChannelListener& result)
>    at
> System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription
> description, ServiceHostBase serviceHost)
>    at System.ServiceModel.ServiceHostBase.InitializeRuntime()
>    at System.ServiceModel.ServiceHostBase.OnBeginOpen()
>    at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
>    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
> timeout)
>    at System.ServiceModel.Channels.CommunicationObject.Open()
>    at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo
> info)
> 
> Is this correct? Or have i misconfigured something? This is my 
> configuration:
> 
>  <system.serviceModel>
>     <bindings>
>       <nmsBinding>
>         <binding name="NewBinding0" destination="test.queue"  />
>       </nmsBinding>
>     </bindings>
>     <extensions>
>       <bindingElementExtensions>
>         <add name="nmsBinding" type="Apache.NMS.WCF.NmsTransportElement,
> Apache.NMS.WCF, Version=1.1.0.1642, Culture=neutral,
> PublicKeyToken=82756feee3957618" />
>       </bindingElementExtensions>
>       <bindingExtensions>
>         <add name="nmsBinding" type="Apache.NMS.WCF.NmsBindingCollection,
> Apache.NMS.WCF, Version=1.1.0.1642, Culture=neutral,
> PublicKeyToken=82756feee3957618" />
>       </bindingExtensions>
>     </extensions>
>     <services>
>       <service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior"
>         name="WcfServiceLibrary1.Service1">
>         <clear />
>         <endpoint address="mex" binding="mexHttpBinding"
> contract="IMetadataExchange"
>           listenUriMode="Explicit">
>           <identity>           
>           </identity>
>         </endpoint>
>         <endpoint address="tcp://johannes-xp:61616" binding="nmsBinding"
>           bindingConfiguration="" contract="WcfServiceLibrary1.IService1"
> />
>         <host>
>           <baseAddresses>
>             <add
> baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/"
> />
>           </baseAddresses>
>         </host>
>       </service>
>     </services>
>     <behaviors>
>       <serviceBehaviors>
>         <behavior name="WcfServiceLibrary1.Service1Behavior">
>           <!-- To avoid disclosing metadata information, 
>           set the value below to false and remove the metadata endpoint
> above before deployment -->
>           <serviceMetadata httpGetEnabled="True"/>
>           <!-- To receive exception details in faults for debugging
> purposes, 
>           set the value below to true.  Set to false before deployment 
>           to avoid disclosing exception information -->
>           <serviceDebug includeExceptionDetailInFaults="False" />
>         </behavior>
>       </serviceBehaviors>
>     </behaviors>
>   </system.serviceModel>
> 
> Thanks, Johannes.
> 

-- 
View this message in context: http://www.nabble.com/NMS-WCF-Binding-tp24607632p24622494.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message