Reputation: 73
The following contract does not generate an operation in the metadata, yet If I remove the reply action or set it to "" the metadata now generates the operation correctly. Why?
[System.ServiceModel.ServiceContractAttribute(Namespace="http://Test/Publish", ConfigurationName="IFCRPublish")]
public interface IFCRPublish
{
// CODEGEN: Generating message contract since the operation PublishNotification is neither RPC nor document wrapped.
[System.ServiceModel.OperationContractAttribute(Action="http://Test/PublishNotification", ReplyAction="*")]
PublishNotificationResponse1 PublishNotification(PublishNotificationRequest1 request);
}
The full service code is in WCF metadata missing operations if it is required.
Upvotes: 7
Views: 2389
Reputation: 5647
Setting ReplyAction="*" for an OperationContract means the WsdlExporter (which publishes the metadata) will ignore that Operation. Setting any other value will fix it.
Upvotes: 7