Hi Craig,
Thanks for taking the time to look at my problem, I literally just
found that while hunting around, I think I'm close but still just
missing the goal.
using (windsorContainer.AddFacility<WcfFacility>(f =>
f.CloseTimeout = TimeSpan.Zero)
.Register(
Component.For<ServiceHostListener>(),
Component.For<NetDataContractFormatBehavior>(),
Component.For<ServiceMetadataBehavior>(),
Component.For<IApplicationService>
().ImplementedBy<ApplicationService>()
.Named("ApplicationService")
.ActAs(
new DefaultServiceModel()
.AddEndpoints
(
WcfEndpoint.BoundTo(new
WSHttpBinding { MaxReceivedMessageSize = int.MaxValue }).At("http://
localhost:8731/ApplicationService/")
//WcfEndpoint.BoundTo(new
NetTcpBinding { MaxReceivedMessageSize = int.MaxValue }).At("net.tcp://
localhost:8731/ApplicationService/")
//
WcfEndpoint.ForContract<IApplicationService>().At("MEX").Binding.
)
)
)
)
According to MSDN: "Add a ServiceMetadataBehavior object to the
ServiceDescription..::.Behaviors collection (or the <serviceMetadata>
element in an application configuration file) to enable or disable the
publication of service metadata. However, adding the behavior to a
service is not sufficient to enable metadata publication:" (http://
msdn.microsoft.com/en-us/library/
system.servicemodel.description.servicemetadatabehavior.aspx)
So sound like I still need an endpoint implementing IMetadataExchange,
just not 100% sure how to do that, sorry only been using Castle for a
couple days now.
Any ideas?
Thanks!
Maxus
On Apr 9, 8:29 pm, Craig Neuwirt <[email protected]> wrote:
> Have you tried adding a ServiceMetadataBehavior?
>
>
>
> On Thu, Apr 9, 2009 at 12:41 AM, Maxus <[email protected]> wrote:
>
> > Hi People,
>
> > I'm trying to create a tcp mex end point, but just cant quite figure
> > it out:
>
> > I have looked at the unit tests to figure out how to create the
> > service which works but I can't create a client due to complaints of
> > there bing no meta data end point:
>
> > What I have so far:
>
> > using (windsorContainer
> > .AddFacility<WcfFacility>(f => f.CloseTimeout =
> > TimeSpan.Zero)
> > .Register(
> > Component.For<ServiceHostListener>(),
> > Component.For<NetDataContractFormatBehavior>(),
> > Component.For<IApplicationService>
> > ().ImplementedBy<ApplicationService>()
> > .Named("Operations")
> > .ActAs(new DefaultServiceModel().AddEndpoints
> > (
> > WcfEndpoint.BoundTo(new NetTcpBinding
> > { PortSharingEnabled = false }).At("net.tcp://localhost/
> > ApplicationService")),
> > WcfEndpoint.BoundTo(new NetTcpBinding
> > { PortSharingEnabled = false }).At("mex")
> > )
> > )
> > )
> > {
> > try
> > {
> > // The service can now be accessed.
> > Console.WriteLine("The service is ready.");
> > Console.WriteLine("Press <ENTER> to terminate
> > service.");
> > Console.ReadLine();
> > }
> > catch (TimeoutException timeProblem)
> > {
> > Console.WriteLine(timeProblem.Message);
> > Console.ReadLine();
> > }
> > catch (CommunicationException commProblem)
> > {
> > Console.WriteLine(commProblem.Message);
> > Console.ReadLine();
> > }
> > }
>
> > Any ideas what I'm doing wrong?
>
> > Thanks in advance!
> > Maxus- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---