Я создал простую службу WCF, размещенную на веб-сайте ASP.NET:
[ServiceContract]
public interface IPaymentNotificationReceiver
{
[OperationContract]
void InvoiceProcessed(string invoiceId);
}
public class PaymentNotificationReceiver : IPaymentNotificationReceiver
{
public void InvoiceProcessed(string invoiceId)
{
Logger.Write("'InvoiceProcessed' method was called with InvoiceId='" +
invoiceId + "'");
}
}
<system.serviceModel>
<services>
<service
behaviorConfiguration =
"NotificationService.PaymentNotificationReceiverBehavior"
name="NotificationService.PaymentNotificationReceiver">
<endpoint address="" binding="wsHttpBinding"
contract="NotificationService.IPaymentNotificationReceiver">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="NotificationService.PaymentNotificationReceiverBehavior">
<!-- 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="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Я могу добавить ссылки на эту службу как на службу WCF, так и на WebService.Приложение WcfTestClient успешно распознало службу и ее методы.
Но «Студия веб-служб» (http://webservicestudio.codeplex.com/) не может получить список операций ... Почему? Как это диагностировать / устранить?
PS Я работаю под VS 2008, используя .NET 3.5