如何将命名空间添加到SearchSchemes?以下是肥皂要求和
电流输出如下。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="CompareYourTravelInsurance.Services">
<soapenv:Header/>
<soapenv:Body>
<com:SearchSchemes>
</com:SearchSchemes>
</soapenv:Body>
</soapenv:Envelope>
我希望输出如下
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<com:SearchSchemes xmlns="CompareYourTravelInsurance.Services">
</com:SearchSchemes>
</soapenv:Body>
</soapenv:Envelope>
以下是我的WCF接口,我在sSeerviceContract添加了命名空间,但我无法将命名空间添加到OperationContract。
[ServiceContract(Namespace = "CompareYourTravelInsurance.Services")]
public interface IMSMWcf
{
[OperationContract(
Action = "CompareYourTravelInsurance.Services/SearchSchemes",
Name = "SearchSchemes",
ReplyAction = "CompareYourTravelInsurance.Services/SearchSchemes",
Namespace="dddd"
), XmlSerializerFormat]
List<QuoteResult> SearchSchemes();
[OperationContract(
Action = "CompareYourTravelInsurance.Services/SaveTravellerInformation",
Name = "SaveTravellerInformation"
), XmlSerializerFormat]
void SaveTravellerInformation();
[OperationContract(
Action = "CompareYourTravelInsurance.Services/SendData",
Name = "SendData",
ReplyAction = "CompareYourTravelInsurance.Services/SendData"
)]
MsmData SendData(string QuoteDetailsRef);
}