Sep 7, 2009

Service Bus Meta Data

The question came up how to emit WCF service meta data for possible clients. According to hhaaii this is not possible with wsHttRelayBinding but only with netTcpRelayBinding. netTcp did not work with svcutil so I tried the following:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="EndpointBehavior">
          <transportClientEndpointBehavior credentialType="UserNamePassword">
            <clientCredentials>
              <userNamePassword userName="<solution>" password="<password>" />
            </clientCredentials>
          </transportClientEndpointBehavior>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
         <serviceMetadata httpGetEnabled="true" httpGetUrl="meta" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="Microsoft.ServiceBus.Samples.EchoService">
        <endpoint behaviorConfiguration="EndpointBehavior" binding="wsHttpRelayBinding"
          contract="Microsoft.ServiceBus.Samples.IEchoContract" />
        <endpoint address="mex" binding="wsHttpRelayBinding" bindingConfiguration=""
          name="MexEndpoint" contract="IMetadataExchange" />
      </service>
    </services>
  </system.serviceModel>
</configuration>

The service started. Going to the service bus registry, clicking the service asked for my credentials

image

but then a Fault was generated:

image

Giving up, sorry.

No comments:

Post a Comment