2010-11-19 8 views
6

Hợp đồng sau không tạo ra một hoạt động trong siêu dữ liệu, nhưng nếu tôi xóa hành động trả lời hoặc đặt nó thành "" siêu dữ liệu sẽ tạo hoạt động chính xác. Tại sao?WCF ReplyAction = "*" ngắt siêu dữ liệu

[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); 
} 

Mã dịch vụ đầy đủ là WCF metadata missing operations nếu cần.

Trả lời

5

Đặt trả lờiAction = "*" cho một OperationContract có nghĩa là WsdlExporter (xuất bản siêu dữ liệu) sẽ bỏ qua thao tác đó. Đặt bất kỳ giá trị nào khác sẽ khắc phục nó.

+3

bạn cũng có thể chỉ xóa hoàn toàn thuộc tính và vẫn hoạt động. –